├── .gitignore
├── README.md
├── build.gradle
├── floatingMenu
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── fr
│ │ └── anthonyfernandez
│ │ └── floatingmenu
│ │ ├── Activities
│ │ ├── Configurations.java
│ │ └── MainActivity.java
│ │ ├── Adapter
│ │ ├── CustomAdapter.java
│ │ └── InitPagerAdapter.java
│ │ ├── Manager
│ │ ├── PInfo.java
│ │ └── RetrievePackages.java
│ │ ├── Service
│ │ └── ServiceFloating.java
│ │ └── Slide
│ │ ├── SlideLaunch.java
│ │ ├── SpanOne.java
│ │ ├── SpanThree.java
│ │ └── SpanTwo.java
│ └── res
│ ├── drawable-hdpi
│ ├── span_1.png
│ ├── span_2.png
│ └── span_3.png
│ ├── drawable-ldpi
│ ├── span_1.png
│ ├── span_2.png
│ └── span_3.png
│ ├── drawable-mdpi
│ ├── span_1.png
│ ├── span_2.png
│ └── span_3.png
│ ├── drawable-xhdpi
│ ├── floating2.png
│ ├── floating3.png
│ ├── floating4.png
│ ├── floating5.png
│ ├── span_1.png
│ ├── span_2.png
│ └── span_3.png
│ ├── drawable-xxhdpi
│ └── github_logo.png
│ ├── layout
│ ├── activity_configurations.xml
│ ├── activity_launch.xml
│ ├── activity_main.xml
│ ├── list_item.xml
│ ├── list_item_config.xml
│ ├── popup.xml
│ ├── row.xml
│ ├── row_config.xml
│ ├── span_one.xml
│ ├── span_three.xml
│ └── span_two.xml
│ ├── menu
│ ├── configurations.xml
│ └── main.xml
│ ├── values-sw600dp
│ └── dimens.xml
│ ├── values-sw720dp-land
│ └── dimens.xml
│ ├── values-v11
│ └── styles.xml
│ ├── values-v14
│ └── styles.xml
│ └── values
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 | #gradle/wrapper
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Android Studio
27 | .idea
28 | *.iml
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | FloatingView [(Application Demo on Play Store)](https://play.google.com/store/apps/details?id=fr.anthonyfernandez.floatingmenu)
2 | --------------------
3 |
4 | DEPRECATED SEE [FloatingView](https://github.com/recruit-lifestyle/FloatingView)
5 |
6 | --------------------
7 |
8 | Floating View for Android app - Facebook ChatHeads Notification system
9 | This is a demo of how works Facebook ChatHeads.
10 |
11 | ## Details
12 |
13 | Basiclay all you need to do is to create a service (background running) with image View like this :
14 |
15 | ```Android
16 | windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
17 |
18 | chatHead = new ImageView(this);
19 | chatHead.setImageResource(R.drawable.floating2);
20 |
21 | final WindowManager.LayoutParams params = new WindowManager.LayoutParams(
22 | WindowManager.LayoutParams.WRAP_CONTENT,
23 | WindowManager.LayoutParams.WRAP_CONTENT,
24 | WindowManager.LayoutParams.TYPE_PHONE,
25 | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
26 | PixelFormat.TRANSLUCENT);
27 |
28 | params.gravity = Gravity.TOP | Gravity.LEFT;
29 | params.x = 0;
30 | params.y = 100;
31 | ```
32 |
33 | Then start your service :
34 | ```Android
35 | startService(new Intent(MainActivity.this, ServiceFloating.class));
36 | ```
37 |
38 | If you wanna have a floating window, you can use PopupWindow :
39 | ```Android
40 | LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
41 | View popupView = layoutInflater.inflate(R.layout.popup, null);
42 | pwindo = new PopupWindow(popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
43 | if(_enable == true) {
44 | pwindo.showAsDropDown(chatHead, 50, -30);
45 | ```
46 |
47 | ## Screenshots
48 |
49 | 
50 | 
51 |
52 |
53 | ## License
54 |
55 | This work is under the MIT License (MIT)
56 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | jcenter()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:2.2.3'
8 | }
9 | }
10 |
11 | allprojects {
12 | repositories {
13 | jcenter()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/floatingMenu/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | apply plugin: 'com.android.application'
3 |
4 | android {
5 | compileSdkVersion 23
6 | buildToolsVersion "25.0.2"
7 |
8 | defaultConfig {
9 | minSdkVersion 11
10 | targetSdkVersion 23
11 | }
12 |
13 | buildTypes {
14 | release {
15 | //runProguard false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile 'com.larswerkman:HoloColorPicker:1.4'
23 | compile 'com.android.support:support-v4:+'
24 | }
25 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
37 |
38 |
39 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Activities/Configurations.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Activities;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.content.SharedPreferences;
6 | import android.content.SharedPreferences.Editor;
7 | import android.graphics.PorterDuff.Mode;
8 | import android.graphics.PorterDuffColorFilter;
9 | import android.graphics.drawable.Drawable;
10 | import android.os.Bundle;
11 | import android.preference.PreferenceManager;
12 | import android.view.Menu;
13 | import android.view.View;
14 | import android.view.View.OnClickListener;
15 | import android.widget.Button;
16 | import android.widget.ImageButton;
17 | import android.widget.ImageView;
18 |
19 | import com.larswerkman.holocolorpicker.ColorPicker;
20 | import com.larswerkman.holocolorpicker.ColorPicker.OnColorChangedListener;
21 | import com.larswerkman.holocolorpicker.OpacityBar;
22 |
23 | import fr.anthonyfernandez.floatingmenu.R;
24 |
25 | public class Configurations extends Activity {
26 |
27 | private ImageView icon;
28 |
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.activity_configurations);
33 |
34 | icon = (ImageView)findViewById(R.id.imageView1);
35 |
36 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(Configurations.this);
37 | if(prefs.getString("ICON", "floating2").equals("floating3")){
38 | icon.setImageResource(R.drawable.floating3);
39 | } else if(prefs.getString("ICON", "floating2").equals("floating4")){
40 | icon.setImageResource(R.drawable.floating4);
41 | } else if(prefs.getString("ICON", "floating2").equals("floating5")){
42 | icon.setImageResource(R.drawable.floating5);
43 | }
44 |
45 | /*
46 | *
47 | * FOR THE COLOR DRAWABLE CHANGING
48 | */
49 | final ColorPicker picker = (ColorPicker) findViewById(R.id.picker);
50 | OpacityBar opacityBar = (OpacityBar) findViewById(R.id.opacitybar);
51 | picker.addOpacityBar(opacityBar);
52 |
53 | //To get the color
54 | picker.getColor();
55 |
56 | //To set the old selected color u can do it like this
57 | picker.setOldCenterColor(picker.getColor());
58 | // adds listener to the colorpicker which is implemented
59 | //in the activity
60 | picker.setOnColorChangedListener(new OnColorChangedListener() {
61 | @Override
62 | public void onColorChanged(int color) {
63 | Drawable mDrawable = icon.getDrawable();
64 | mDrawable.setColorFilter(new
65 | PorterDuffColorFilter(picker.getColor(),Mode.MULTIPLY));
66 | icon.setImageDrawable(mDrawable);
67 | }
68 | });
69 |
70 | /*
71 | *
72 | * FOR THE ICON CHANGING
73 | */
74 |
75 | ImageButton image1 = (ImageButton)findViewById(R.id.imageButton1);
76 | image1.setOnClickListener(new OnClickListener() {
77 | @Override
78 | public void onClick(View v) {
79 |
80 | setPreferences("floating3");
81 | icon.setImageResource(R.drawable.floating3);
82 | }
83 | });
84 | ImageButton image2 = (ImageButton)findViewById(R.id.imageButton2);
85 | image2.setOnClickListener(new OnClickListener() {
86 | @Override
87 | public void onClick(View v) {
88 | setPreferences("floating4");
89 | icon.setImageResource(R.drawable.floating4);
90 | }
91 | });
92 | ImageButton image3 = (ImageButton)findViewById(R.id.imageButton3);
93 | image3.setOnClickListener(new OnClickListener() {
94 | @Override
95 | public void onClick(View v) {
96 | setPreferences("floating5");
97 | icon.setImageResource(R.drawable.floating5);
98 | }
99 | });
100 |
101 | Button restore = (Button)findViewById(R.id.restore);
102 | restore.setOnClickListener(new OnClickListener() {
103 | @Override
104 | public void onClick(View v) {
105 | setPreferences("floating2");
106 | icon.setImageResource(R.drawable.floating2);
107 | }
108 | });
109 |
110 | Button backHome = (Button)findViewById(R.id.back_main);
111 | backHome.setOnClickListener(new OnClickListener() {
112 | @Override
113 | public void onClick(View v) {
114 | Intent intentMain = new Intent(Configurations.this, MainActivity.class);
115 | startActivity(intentMain);
116 | }
117 | });
118 | }
119 |
120 | @Override
121 | public boolean onCreateOptionsMenu(Menu menu) {
122 | // Inflate the menu; this adds items to the action bar if it is present.
123 | getMenuInflater().inflate(R.menu.configurations, menu);
124 | return true;
125 | }
126 |
127 | private void setPreferences(String myIconPref)
128 | {
129 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(Configurations.this);
130 | Editor editor = prefs.edit();
131 | editor.putString("ICON", myIconPref);
132 | editor.commit();
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Activities/MainActivity.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Activities;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.net.Uri;
6 | import android.os.Build;
7 | import android.os.Bundle;
8 | import android.provider.Settings;
9 | import android.view.View;
10 | import android.view.View.OnClickListener;
11 | import android.widget.Button;
12 | import android.widget.ImageView;
13 |
14 | import fr.anthonyfernandez.floatingmenu.R;
15 | import fr.anthonyfernandez.floatingmenu.Service.ServiceFloating;
16 |
17 | public class MainActivity extends Activity {
18 |
19 | public static int OVERLAY_PERMISSION_REQ_CODE = 1234;
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | setContentView(R.layout.activity_main);
25 |
26 | Bundle bundle = getIntent().getExtras();
27 |
28 | if(bundle != null && bundle.getString("LAUNCH").equals("YES")) {
29 | startService(new Intent(MainActivity.this, ServiceFloating.class));
30 | }
31 |
32 | Button launch = (Button)findViewById(R.id.button1);
33 | launch.setOnClickListener(new OnClickListener() {
34 |
35 | @Override
36 | public void onClick(View v) {
37 | startService(new Intent(MainActivity.this, ServiceFloating.class));
38 | }
39 | });
40 |
41 | Button stop = (Button)findViewById(R.id.button2);
42 | stop.setOnClickListener(new OnClickListener() {
43 |
44 | @Override
45 | public void onClick(View v) {
46 | stopService(new Intent(MainActivity.this, ServiceFloating.class));
47 | }
48 | });
49 |
50 | ImageView github = (ImageView)findViewById(R.id.imageView1);
51 | github.setOnClickListener(new OnClickListener() {
52 |
53 | @Override
54 | public void onClick(View v) {
55 | String url = "https://github.com/marshallino16/FloatingNotification";
56 | Intent i = new Intent(Intent.ACTION_VIEW);
57 | i.setData(Uri.parse(url));
58 | startActivity(i);
59 | }
60 | });
61 |
62 | Button config = (Button)findViewById(R.id.button_config);
63 | config.setOnClickListener(new OnClickListener() {
64 |
65 | @Override
66 | public void onClick(View arg0) {
67 | Intent intent = new Intent(MainActivity.this, Configurations.class);
68 | startActivity(intent);
69 | stopService(new Intent(MainActivity.this, ServiceFloating.class));
70 | }
71 | });
72 | checkPermission();
73 |
74 | }
75 |
76 |
77 | public void checkPermission() {
78 | if(Build.VERSION.SDK_INT >= 23) {
79 | if (!Settings.canDrawOverlays(MainActivity.this)) {
80 | Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
81 | Uri.parse("package:" + getPackageName()));
82 | startActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE);
83 | }
84 | }
85 | }
86 |
87 |
88 | @Override
89 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
90 | if (requestCode == OVERLAY_PERMISSION_REQ_CODE) {
91 | if (!Settings.canDrawOverlays(this)) {
92 | // SYSTEM_ALERT_WINDOW permission not granted...
93 | }
94 | }
95 | }
96 |
97 | @Override
98 | protected void onResume() {
99 | Bundle bundle = getIntent().getExtras();
100 |
101 | if(bundle != null && bundle.getString("LAUNCH").equals("YES")) {
102 | startService(new Intent(MainActivity.this, ServiceFloating.class));
103 | }
104 | super.onResume();
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Adapter/CustomAdapter.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Adapter;
2 |
3 | import java.util.List;
4 |
5 | import fr.anthonyfernandez.floatingmenu.R;
6 | import fr.anthonyfernandez.floatingmenu.Manager.PInfo;
7 | import android.content.Context;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.ArrayAdapter;
12 | import android.widget.ImageView;
13 | import android.widget.LinearLayout;
14 | import android.widget.TextView;
15 |
16 | public class CustomAdapter extends ArrayAdapter{
17 |
18 | private int resource;
19 | private LayoutInflater inflater;
20 | private Context context;
21 |
22 | public CustomAdapter ( Context ctx, int resourceId, List apps) {
23 |
24 | super( ctx, resourceId, apps );
25 | resource = resourceId;
26 | inflater = LayoutInflater.from( ctx );
27 | context=ctx;
28 | }
29 |
30 | @Override
31 | public View getView ( int position, View convertView, ViewGroup parent ) {
32 |
33 | convertView = (LinearLayout) inflater.inflate( resource, null );
34 |
35 | PInfo app = (PInfo) getItem(position);
36 |
37 | TextView txtName = (TextView) convertView.findViewById(R.id.textView1);
38 | txtName.setText(app.appname);
39 |
40 | ImageView imageCity = (ImageView) convertView.findViewById(R.id.imageView1);
41 | imageCity.setImageDrawable(app.icon);
42 | return convertView;
43 | }
44 | }
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Adapter/InitPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Adapter;
2 |
3 |
4 | import java.util.List;
5 |
6 | import android.support.v4.app.Fragment;
7 | import android.support.v4.app.FragmentManager;
8 | import android.support.v4.app.FragmentPagerAdapter;
9 |
10 | public class InitPagerAdapter extends FragmentPagerAdapter {
11 |
12 | private final List fragments;
13 |
14 | //On fournit l'adapter la liste des fragments afficher
15 | public InitPagerAdapter(FragmentManager fm, List fragments) {
16 | super(fm);
17 | this.fragments = fragments;
18 | }
19 |
20 | @Override
21 | public Fragment getItem(int position) {
22 | return (Fragment) this.fragments.get(position);
23 | }
24 |
25 | @Override
26 | public int getCount() {
27 | return this.fragments.size();
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Manager/PInfo.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Manager;
2 |
3 | import android.graphics.drawable.Drawable;
4 | import android.util.Log;
5 |
6 | public class PInfo {
7 | public String appname = "";
8 | public String pname = "";
9 | public String versionName = "";
10 | public int versionCode = 0;
11 | public Drawable icon;
12 | public void prettyPrint() {
13 | Log.v("tag", appname + "\t" + pname + "\t" + versionName + "\t" + versionCode);
14 | }
15 | }
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Manager/RetrievePackages.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Manager;
2 |
3 | import android.content.Context;
4 | import android.content.pm.ApplicationInfo;
5 | import android.content.pm.PackageInfo;
6 |
7 | import java.util.ArrayList;
8 | import java.util.List;
9 |
10 | public class RetrievePackages {
11 |
12 | private Context _ctx;
13 |
14 | public RetrievePackages(Context ctx) {
15 | _ctx = ctx;
16 | }
17 |
18 | public ArrayList getPackages() {
19 | ArrayList apps = getInstalledApps(false); /* false = no system packages */
20 | final int max = apps.size();
21 | for (int i=0; i getInstalledApps(boolean getSysPackages) {
28 | ArrayList res = new ArrayList();
29 | List packs = _ctx.getPackageManager().getInstalledPackages(0);
30 | for(int i=0;i myArray;
46 | ArrayList apps;
47 | List listCity;
48 |
49 | @Override
50 | public IBinder onBind(Intent intent) {
51 | // TODO Auto-generated method stub
52 | return null;
53 | }
54 |
55 | @Override
56 | public void onCreate() {
57 | super.onCreate();
58 |
59 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
60 |
61 | RetrievePackages getInstalledPackages = new RetrievePackages(getApplicationContext());
62 | apps = getInstalledPackages.getInstalledApps(false);
63 | myArray = new ArrayList();
64 |
65 | for(int i=0 ; i arrayAdapter =
171 | //new ArrayAdapter(this,R.layout.list_item, myArray);
172 | popup.setAdapter(new CustomAdapter(getApplicationContext(), R.layout.row, listCity));
173 | popup.setOnItemClickListener(new OnItemClickListener() {
174 |
175 | @Override
176 | public void onItemClick(AdapterView> arg0, View view, int position, long id3) {
177 | //Log.w("tag", "package : "+apps.get(position).pname.toString());
178 | Intent i;
179 | PackageManager manager = getPackageManager();
180 | try {
181 | i = manager.getLaunchIntentForPackage(apps.get(position).pname.toString());
182 | if (i == null)
183 | throw new PackageManager.NameNotFoundException();
184 | i.addCategory(Intent.CATEGORY_LAUNCHER);
185 | startActivity(i);
186 | } catch (PackageManager.NameNotFoundException e) {
187 |
188 | }
189 | }
190 | });
191 | popup.show();
192 |
193 | } catch (Exception e) {
194 | e.printStackTrace();
195 | }
196 | }
197 |
198 | public void createNotification(){
199 | Intent notificationIntent = new Intent(getApplicationContext(), ServiceFloating.class);
200 | PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(), 0, notificationIntent, 0);
201 |
202 |
203 | NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
204 | .setContentIntent(pendingIntent)
205 | .setSmallIcon(R.drawable.floating2).setTicker("Click to start launcher").setWhen(System.currentTimeMillis())
206 | .setContentTitle("Start launcher")
207 | .setContentText("Click to start launcher");
208 |
209 | NotificationManager notificationManager = (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);
210 | notificationManager.notify(ID_NOTIFICATION, builder.build());
211 | }
212 |
213 | @Override
214 | public void onDestroy() {
215 | super.onDestroy();
216 | if (chatHead != null) windowManager.removeView(chatHead);
217 | }
218 |
219 | }
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Slide/SlideLaunch.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Slide;
2 |
3 | import java.util.List;
4 | import java.util.Vector;
5 |
6 | import fr.anthonyfernandez.floatingmenu.R;
7 |
8 | import fr.anthonyfernandez.floatingmenu.Activities.MainActivity;
9 | import fr.anthonyfernandez.floatingmenu.Adapter.InitPagerAdapter;
10 | import android.content.Intent;
11 | import android.content.SharedPreferences;
12 | import android.os.Bundle;
13 | import android.os.Handler;
14 | import android.os.Message;
15 | import android.preference.PreferenceManager;
16 | import android.support.v4.app.Fragment;
17 | import android.support.v4.app.FragmentActivity;
18 | import android.support.v4.view.PagerAdapter;
19 | import android.support.v4.view.ViewPager;
20 |
21 | public class SlideLaunch extends FragmentActivity {
22 |
23 | private PagerAdapter mPagerAdapter;
24 | private Handler handler = new Handler()
25 | {
26 | public void handleMessage(Message msg)
27 | {
28 | Intent i = new Intent(SlideLaunch.this, MainActivity.class);
29 | SlideLaunch.this.startActivity(i);
30 | finish();
31 | }
32 | };
33 |
34 | @Override
35 | protected void onCreate(Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 |
38 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
39 | if(!prefs.getBoolean("first_time", false))
40 | {
41 | SharedPreferences.Editor editor = prefs.edit();
42 | editor.putBoolean("first_time", true);
43 | editor.commit();
44 | setContentView(R.layout.activity_launch);
45 |
46 | // Creation de la liste de Fragments que fera defiler le PagerAdapter
47 | List fragments = new Vector();
48 |
49 | // Ajout des Fragments dans la liste
50 | fragments.add(Fragment.instantiate(this,SpanOne.class.getName()));
51 | fragments.add(Fragment.instantiate(this,SpanTwo.class.getName()));
52 | fragments.add(Fragment.instantiate(this,SpanThree.class.getName()));
53 |
54 | // Creation de l'adapter qui s'occupera de l'affichage de la liste de
55 | // Fragments
56 | this.mPagerAdapter = new InitPagerAdapter(super.getSupportFragmentManager(), fragments);
57 |
58 | ViewPager pager = (ViewPager) super.findViewById(R.id.viewpager);
59 | // Affectation de l'adapter au ViewPager
60 | pager.setAdapter(this.mPagerAdapter);
61 |
62 | }
63 | else
64 | {
65 | handler.sendEmptyMessage(0);
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Slide/SpanOne.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Slide;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentActivity;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import fr.anthonyfernandez.floatingmenu.R;
11 |
12 | public class SpanOne extends Fragment{
13 |
14 | private FragmentActivity fa;
15 |
16 | @Override
17 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
18 | Bundle savedInstanceState) {
19 | fa = super.getActivity();
20 | View one = inflater.inflate(R.layout.span_one, container, false);
21 |
22 |
23 | return one;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Slide/SpanThree.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Slide;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.app.FragmentActivity;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.view.View.OnClickListener;
11 | import android.widget.Button;
12 | import fr.anthonyfernandez.floatingmenu.R;
13 | import fr.anthonyfernandez.floatingmenu.Activities.Configurations;
14 |
15 | public class SpanThree extends Fragment{
16 |
17 | private FragmentActivity fa;
18 |
19 | @Override
20 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
21 | Bundle savedInstanceState) {
22 | fa = super.getActivity();
23 | View three = inflater.inflate(R.layout.span_three, container, false);
24 |
25 | Button validerInscription = (Button)three.findViewById(R.id.valider);
26 | validerInscription.setOnClickListener(new OnClickListener() {
27 |
28 | @Override
29 | public void onClick(View v) {
30 | Intent intent = new Intent(fa, Configurations.class);
31 | startActivity(intent);
32 | }
33 | });
34 |
35 | return three;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/java/fr/anthonyfernandez/floatingmenu/Slide/SpanTwo.java:
--------------------------------------------------------------------------------
1 | package fr.anthonyfernandez.floatingmenu.Slide;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentActivity;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import fr.anthonyfernandez.floatingmenu.R;
10 |
11 | public class SpanTwo extends Fragment{
12 |
13 | private FragmentActivity fa;
14 |
15 | @Override
16 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
17 | Bundle savedInstanceState) {
18 | fa = super.getActivity();
19 | View two = inflater.inflate(R.layout.span_two, container, false);
20 |
21 |
22 | return two;
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-hdpi/span_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-hdpi/span_1.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-hdpi/span_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-hdpi/span_2.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-hdpi/span_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-hdpi/span_3.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-ldpi/span_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-ldpi/span_1.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-ldpi/span_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-ldpi/span_2.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-ldpi/span_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-ldpi/span_3.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-mdpi/span_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-mdpi/span_1.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-mdpi/span_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-mdpi/span_2.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-mdpi/span_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-mdpi/span_3.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-xhdpi/floating2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-xhdpi/floating2.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-xhdpi/floating3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-xhdpi/floating3.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-xhdpi/floating4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-xhdpi/floating4.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-xhdpi/floating5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-xhdpi/floating5.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-xhdpi/span_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-xhdpi/span_1.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-xhdpi/span_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-xhdpi/span_2.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-xhdpi/span_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-xhdpi/span_3.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/drawable-xxhdpi/github_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/floatingMenu/src/main/res/drawable-xxhdpi/github_logo.png
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/activity_configurations.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
19 |
20 |
24 |
25 |
30 |
31 |
40 |
41 |
51 |
52 |
53 |
54 |
63 |
64 |
69 |
70 |
74 |
75 |
84 |
85 |
94 |
95 |
103 |
104 |
105 |
110 |
111 |
117 |
118 |
124 |
125 |
126 |
127 |
128 |
129 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/activity_launch.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
22 |
23 |
32 |
33 |
44 |
45 |
53 |
54 |
60 |
61 |
71 |
72 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/list_item.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/list_item_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/popup.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/row.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
17 |
18 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/row_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
17 |
27 |
28 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/span_one.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/span_three.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
17 |
18 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/layout/span_two.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/menu/configurations.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
10 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | FloatingLauncher
5 | Settings
6 | Hello world!
7 | Configurations
8 |
9 |
10 |
--------------------------------------------------------------------------------
/floatingMenu/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marshallino16/Demo-FloatingView/870f06675916952120667b71cb95f08127199020/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Feb 23 17:25:24 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':floatingMenu'
2 |
--------------------------------------------------------------------------------