├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── ftd2009
│ │ └── floatingviewdemo
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── ftd2009
│ │ │ └── floatingviewdemo
│ │ │ ├── Constants.java
│ │ │ ├── FloatManager.java
│ │ │ ├── FloatView.java
│ │ │ ├── MainActivity.java
│ │ │ ├── PreferebceManager.java
│ │ │ └── Utils.java
│ └── res
│ │ ├── drawable-xhdpi
│ │ ├── _2345icon_belongto2345.png
│ │ ├── activity_belongto2345.jpg
│ │ ├── activity_default_belongto2345.png
│ │ ├── activity_seclected_belongto2345.png
│ │ ├── apps_count_num_belongto2345.png
│ │ ├── arrowleft_belongto2345.png
│ │ ├── arrowright_belongto2345.png
│ │ ├── back_menu_normal_belongto2345.png
│ │ ├── back_menu_press_belongto2345.png
│ │ ├── back_normal_belongto2345.png
│ │ ├── back_press_belongto2345.png
│ │ ├── background_belongto2345.9.png
│ │ ├── backlogin_belongto2345.png
│ │ ├── btn_normal_belongto2345.9.png
│ │ ├── btn_press_belongto2345.9.png
│ │ ├── btnblue_default_belongto2345.9.png
│ │ ├── btngreen_normal_belongto2345.9.png
│ │ ├── btngreen_press_belongto2345.9.png
│ │ ├── btngrey_normal_belongto2345.9.png
│ │ ├── btngrey_press_belongto2345.9.png
│ │ ├── btngreydefault_belongto2345.9.png
│ │ ├── btnorange_normal_belongto2345.9.png
│ │ ├── btnorange_press_belongto2345.9.png
│ │ ├── btnrefresh_press_belongto2345.9.png
│ │ ├── charge_default_belongto2345.png
│ │ ├── charge_selected_belongto2345.png
│ │ ├── checkbox_selected_belongto2345.png
│ │ ├── checkbox_unselected_belongto2345.png
│ │ ├── close_normal_belongto2345.png
│ │ ├── close_press_belongto2345.png
│ │ ├── customerservice_belongto2345.png
│ │ ├── dialog_bg_belongto2345.9.png
│ │ ├── dialog_closed_normal_belongto2345.png
│ │ ├── dialog_closed_press_belongto2345.png
│ │ ├── dropzone_activity_normal_belongto2345.png
│ │ ├── dropzone_activity_press_belongto2345.png
│ │ ├── dropzone_charge_normal_belongto2345.png
│ │ ├── dropzone_charge_press_belongto2345.png
│ │ ├── dropzone_gift_normal_belongto2345.png
│ │ ├── dropzone_gift_press_belongto2345.png
│ │ ├── dropzone_person_normal_belongto2345.png
│ │ ├── dropzone_person_press_belongto2345.png
│ │ ├── dropzonebg_belongto2345.png
│ │ ├── dropzonebg_left_belongto2345.png
│ │ ├── floatview.gif
│ │ ├── forward_normal_belongto2345.png
│ │ ├── forward_press_belongto2345.png
│ │ ├── gift_default_belongto2345.png
│ │ ├── gift_get_success_bg_belongto2345.png
│ │ ├── gift_selected_belongto2345.png
│ │ ├── horizontal_zhezao_belongto2345.png
│ │ ├── horizontalscreenbg_belongto2345.jpg
│ │ ├── horizontalselectbarbg_belongto2345.9.png
│ │ ├── icon_get_gift_success_belongto2345.png
│ │ ├── loading_bg_belongto2345.png
│ │ ├── loading_logo_belongto2345.png
│ │ ├── loginpassword_belongto2345.png
│ │ ├── loginuser_belongto2345.png
│ │ ├── logo_landscape_belongto2345.png
│ │ ├── logo_portrait1_belongto2345.png
│ │ ├── logo_portrait_belongto2345.png
│ │ ├── nogift_defalut_belongto2345.png
│ │ ├── nonetwork_belongto2345.png
│ │ ├── packagecode_belongto2345.jpg
│ │ ├── password_belongto2345.png
│ │ ├── passwordnotshow_normal.png
│ │ ├── passwordnotshow_normal_belongto2345.png
│ │ ├── passwordnotshow_press.png
│ │ ├── passwordnotshow_press_belongto2345.png
│ │ ├── passwordshow_normal.png
│ │ ├── passwordshow_normal_belongto2345.png
│ │ ├── passwordshow_press.png
│ │ ├── passwordshow_press_belongto2345.png
│ │ ├── personalcenter_default_belongto2345.png
│ │ ├── personalcenter_selected_belongto2345.png
│ │ ├── phone_belongto2345.png
│ │ ├── portraitselectbarbg_belongto2345.9.png
│ │ ├── progress_bg_belongto2345.9.png
│ │ ├── qqlogin_belongto2345.png
│ │ ├── qqlogin_bg_normal.9.png
│ │ ├── qqlogin_bg_normal_belongto2345.9.png
│ │ ├── qqlogin_bg_press.9.png
│ │ ├── qqlogin_bg_press_belongto2345.9.png
│ │ ├── refreshbtn_normal_belongto2345.9.png
│ │ ├── returnlogin_bg_normal_belongto2345.9.png
│ │ ├── returnlogin_bg_press_belongto2345.9.png
│ │ ├── textbox_arrowdown_normal_belongto2345.png
│ │ ├── textbox_arrowdown_press_belongto2345.png
│ │ ├── textbox_arrowup_normal_belongto2345.png
│ │ ├── textbox_arrowup_press_belongto2345.png
│ │ ├── textbox_bg_belongto2345.9.png
│ │ ├── textbox_bg_error_belongto2345.9.png
│ │ ├── textbox_bg_normal_belongto2345.9.png
│ │ ├── textbox_bg_select_belongto2345.9.png
│ │ ├── textbox_close_normal.png
│ │ ├── textbox_close_press.png
│ │ ├── textbox_closed_normal_belongto2345.png
│ │ ├── textbox_closed_press_belongto2345.png
│ │ ├── titlebutton_nomal_belongto2345.9.png
│ │ ├── titlebutton_press_belongto2345.9.png
│ │ ├── toast_bg_belongto2345.9.png
│ │ ├── toast_icon_belongto2345.png
│ │ ├── touxiangzhezao_belongto2345.png
│ │ ├── user_belongto2345.png
│ │ ├── vertical_zhezao_belongto2345.png
│ │ ├── verticalscreenbg_belongto2345.jpg
│ │ ├── warningicon_belongto2345.png
│ │ ├── zhangyu_belongto2345.png
│ │ ├── zhangyu_selected_belongto2345.png
│ │ └── zhangyured_belongto2345.png
│ │ ├── drawable
│ │ ├── gift_clip.xml
│ │ ├── my_progress_style_belongto2345.xml
│ │ ├── selector_backbutton_belongto2345.xml
│ │ ├── selector_canclebinding_button_belongto2345.xml
│ │ ├── selector_chargecenterradiobutton_belongto2345.xml
│ │ ├── selector_checkbox_belongto2345.xml
│ │ ├── selector_dialogclosebutton_belongto2345.xml
│ │ ├── selector_downusersback_belongto2345.xml
│ │ ├── selector_downuserstext_belongto2345.xml
│ │ ├── selector_edittextback_belongto2345.xml
│ │ ├── selector_eventcenter_belongto2345.xml
│ │ ├── selector_eventcenterradiobutton_belongto2345.xml
│ │ ├── selector_eventdialogclosebutton_belongto2345.xml
│ │ ├── selector_floatingbackbutton_belongto2345.xml
│ │ ├── selector_floatingbacktext_belongto2345.xml
│ │ ├── selector_forward_belongto2345.xml
│ │ ├── selector_getgift_belongto2345.xml
│ │ ├── selector_gift_belongto2345.xml
│ │ ├── selector_giftradiobackground_belongto2345.xml
│ │ ├── selector_giftradiobackground_portrait_belongto2345.xml
│ │ ├── selector_giftradiobutton_belongto2345.xml
│ │ ├── selector_giftradiobuttontext_belongto2345.xml
│ │ ├── selector_paycenter_belongto2345.xml
│ │ ├── selector_private_item_belongto2345.xml
│ │ ├── selector_privatecenter_belongto2345.xml
│ │ ├── selector_privatecenterradiobutton_belongto2345.xml
│ │ ├── selector_privatecentertext_belongto2345.xml
│ │ ├── selector_qqbutton_belongto2345.xml
│ │ ├── selector_refresh_bg_belongto2345.xml
│ │ ├── selector_signinbutton_belongto2345.xml
│ │ ├── selector_submitbutton_belongto2345.xml
│ │ ├── selector_textclosebutton_belongto2345.xml
│ │ ├── selector_titlebutton_belongto2345.xml
│ │ ├── selector_titlebuttontextcolor_belongto2345.xml
│ │ ├── selector_usereditdown_belongto2345.xml
│ │ ├── selector_usereditup_belongto2345.xml
│ │ ├── shape_backframe_belongto2345.xml
│ │ ├── shape_cornerbutton_belongto2345.xml
│ │ ├── shape_cornerframe_belongto2345.xml
│ │ └── shape_cursor_belongto2345.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── content_main.xml
│ │ └── float_window_big_belongto2345.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-v21
│ │ └── styles.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── ftd2009
│ └── floatingviewdemo
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | FloatingViewDemo
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
22 |
23 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.7
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FloatingViewDemo
2 | 
3 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.0"
6 |
7 | defaultConfig {
8 | applicationId "com.ftd2009.floatingviewdemo"
9 | minSdkVersion 9
10 | targetSdkVersion 24
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | testCompile 'junit:junit:4.12'
25 | compile 'com.android.support:appcompat-v7:24.+'
26 | compile 'com.android.support:design:24.+'
27 | }
28 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\soft\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/ftd2009/floatingviewdemo/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.ftd2009.floatingviewdemo;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ftd2009/floatingviewdemo/Constants.java:
--------------------------------------------------------------------------------
1 | package com.ftd2009.floatingviewdemo;
2 |
3 |
4 | public class Constants {
5 |
6 | public static final String PERFERENCE_NAME = "prefer_floating";
7 |
8 | public static final String PREF_KEY_FLOAT_X = "float_x";
9 | public static final String PREF_KEY_FLOAT_Y = "float_y";
10 | public static final String PREF_KEY_DISPLAY_ON_HOME = "display_on_home";
11 | public static final String PREF_KEY_IS_RIGHT = "is_right";
12 | public static final String PREF_KEY_GIFT_CLICK = "get_gift_click";
13 |
14 | public static final String PREF_KEY_FIRST_SUCCESS_GET = "first_success_get";
15 |
16 | public static final String PREF_KEY_GAME_ID = "game_id";
17 |
18 | public static final String PREF_KEY_RED_POINT_EVENT = "red_point_event";
19 |
20 | public static final String PREF_KEY_EVENT_DIALOG = "event_dialog";
21 |
22 | public static final String GAME_PACKAGE_NAME="game_package_name_belongto2345";
23 |
24 | public static final String UPDATE_PATH="update_path_belongto2345";
25 |
26 | public static final String FIRST_FLOAT_VIEW="first_float_view_belongto2345";
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ftd2009/floatingviewdemo/FloatManager.java:
--------------------------------------------------------------------------------
1 | package com.ftd2009.floatingviewdemo;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.preference.PreferenceManager;
6 | import android.view.Gravity;
7 | import android.view.View;
8 | import android.view.View.OnClickListener;
9 | import android.view.ViewGroup;
10 | import android.view.WindowManager;
11 | import android.widget.ImageView;
12 | import android.widget.PopupWindow;
13 | import android.widget.RelativeLayout;
14 | import android.widget.Toast;
15 |
16 | import java.util.Timer;
17 | import java.util.TimerTask;
18 |
19 |
20 | /**
21 | * 悬浮球管理类
22 | *
23 | * @author jy
24 | */
25 | public class FloatManager {
26 | private WindowManager.LayoutParams windowParams = new WindowManager.LayoutParams();
27 | private FloatView floatView = null;
28 | private boolean isDisplay = false;
29 | private Context context;
30 | private PreferebceManager mPreferenceManager;
31 | private boolean isRight;
32 | private View popupView;
33 | private PopupWindow popupWindow;
34 |
35 | private static FloatManager instance = null;
36 |
37 | public static FloatManager getFloatManager(Context context) {
38 | if (instance == null) {
39 | instance = new FloatManager(context);
40 | }
41 | return instance;
42 | }
43 |
44 | private FloatManager(Context context) {
45 | this.context = context;
46 | mPreferenceManager = new PreferebceManager(context);
47 |
48 | }
49 |
50 | public WindowManager.LayoutParams getWindowParams() {
51 | return windowParams;
52 | }
53 |
54 | public void removeView() {
55 | if (!isDisplay)
56 | return;
57 | if (floatView != null) {
58 | floatView.cancelTimerCount();
59 | }
60 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
61 | windowManager.removeView(floatView);
62 | floatView = null;
63 | isDisplay = false;
64 |
65 | }
66 |
67 | public void createView() {
68 | if (isDisplay)
69 | return;
70 | floatView = new FloatView(context, windowParams);
71 | floatView.setOnClickListener(floatViewClick);
72 | floatView.setOnMoveListener(new FloatView.OnMoveListener() {
73 | @Override
74 | public void onMove() {
75 | dismisPopupWindow();
76 | cancelPopUpWindowTimerCount();
77 | }
78 | });
79 | // 获取WindowManager
80 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
81 | windowManager.addView(floatView, windowParams);
82 | isDisplay = true;
83 | }
84 |
85 | private OnClickListener floatViewClick = new OnClickListener() {
86 |
87 | public void onClick(View v) {
88 |
89 |
90 | isRight = mPreferenceManager.isDisplayRight();
91 | View popupView = View.inflate(context, Utils.getLayout(context, "float_window_big"), null);
92 | RelativeLayout centerlayout = (RelativeLayout) popupView.findViewById(Utils.getId(context, "center"));
93 | RelativeLayout giftlayout = (RelativeLayout) popupView.findViewById(Utils.getId(context, "gift"));
94 | RelativeLayout paylayout = (RelativeLayout) popupView.findViewById(Utils.getId(context, "pay"));
95 | RelativeLayout eventlayout = (RelativeLayout) popupView.findViewById(Utils.getId(context, "event"));
96 | View redView = (ImageView) popupView.findViewById(Utils.getId(context, "redview"));
97 |
98 | if (popupWindow != null && popupWindow.isShowing()) {
99 | popupWindow.dismiss();
100 | floatView.startTimerCount(3000);
101 | cancelPopUpWindowTimerCount();
102 | //floatView.setImageResource(Utils.getDrawable(context,"zhangyu"));
103 | } else {
104 | floatView.cancelTimerCount();
105 |
106 | //floatView.setImageResource(Utils.getDrawable(context,"zhangyu_selected"));
107 | popupWindow = new PopupWindow(popupView, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
108 | /*popupWindow.setFocusable(true);
109 | popupWindow.setOutsideTouchable(true);
110 | popupWindow.setBackgroundDrawable(new BitmapDrawable());*/
111 | popupWindow.setClippingEnabled(false);
112 | //popupWindow.showAsDropDown(v);
113 | if (isRight) {
114 | popupView.setBackgroundResource(Utils.getDrawable(context, "dropzonebg"));
115 | popupWindow.showAtLocation(floatView, Gravity.RIGHT, floatView.getWidth(), 0);
116 | } else {
117 | popupView.setPadding(Utils.dip2px(context, 10), 0, 0, 0);
118 | popupView.setBackgroundResource(Utils.getDrawable(context, "dropzonebg_left"));
119 | popupWindow.showAtLocation(floatView, Gravity.LEFT, floatView.getWidth(), 0);
120 | }
121 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
122 | boolean clickRedPoint = false;
123 | if (!clickRedPoint) {
124 | redView.setVisibility(View.VISIBLE);
125 | } else {
126 | redView.setVisibility(View.GONE);
127 | }
128 |
129 | centerlayout.setOnClickListener(new OnClickListener() {
130 | @Override
131 | public void onClick(View view) {
132 | //个人中心
133 | Toast.makeText(context, "个人中心", Toast.LENGTH_SHORT).show();
134 | dismisPopupWindow();
135 |
136 | }
137 | });
138 | giftlayout.setOnClickListener(new OnClickListener() {
139 | @Override
140 | public void onClick(View view) {
141 | Toast.makeText(context, "礼包", Toast.LENGTH_SHORT).show();
142 | dismisPopupWindow();
143 | }
144 | });
145 | paylayout.setOnClickListener(new OnClickListener() {
146 |
147 | @Override
148 | public void onClick(View arg0) {
149 | Toast.makeText(context, "充值中心", Toast.LENGTH_SHORT).show();
150 | dismisPopupWindow();
151 |
152 | }
153 | });
154 | eventlayout.setOnClickListener(new OnClickListener() {
155 |
156 | @Override
157 | public void onClick(View arg0) {
158 | Toast.makeText(context, "活动", Toast.LENGTH_SHORT).show();
159 | dismisPopupWindow();
160 |
161 | }
162 | });
163 |
164 |
165 | startPopUpWindowTimerCount();
166 | }
167 |
168 | }
169 | };
170 |
171 |
172 | private void dismisPopupWindow() {
173 | if (popupWindow != null) {
174 | popupWindow.dismiss();
175 | popupWindow = null;
176 | }
177 | }
178 |
179 | private Timer popUpWindowTimer;
180 | //定时器取消
181 | private boolean isCancelpopUpWindow;
182 | private TimerTask popUpWindowTimerTask;
183 | private android.os.Handler handler = new android.os.Handler() {
184 | public void handleMessage(android.os.Message msg) {
185 | switch (msg.what) {
186 | case 0:
187 | dismisPopupWindow();
188 | if (floatView != null) {
189 | floatView.startTimerCount(3000);
190 | }
191 |
192 | break;
193 | }
194 | }
195 |
196 | ;
197 | };
198 |
199 | public void startPopUpWindowTimerCount() {
200 | isCancelpopUpWindow = false;
201 | popUpWindowTimer = new Timer();
202 | popUpWindowTimerTask = new TimerTask() {
203 | @Override
204 | public void run() {
205 | if (!isCancelpopUpWindow) {
206 | handler.sendEmptyMessage(0);
207 | }
208 | }
209 | };
210 | popUpWindowTimer.schedule(popUpWindowTimerTask, 3000);
211 | }
212 |
213 | public void cancelPopUpWindowTimerCount() {
214 | isCancelpopUpWindow = true;
215 | if (popUpWindowTimer != null) {
216 | popUpWindowTimer.cancel();
217 | popUpWindowTimer = null;
218 | }
219 | if (popUpWindowTimerTask != null) {
220 | popUpWindowTimerTask.cancel();
221 | popUpWindowTimerTask = null;
222 | }
223 | }
224 |
225 |
226 | /**
227 | * 程序进入后台或者退出事调用
228 | */
229 | public void cancelTimerCount() {
230 | if (floatView != null) {
231 | floatView.cancelTimerCount();
232 | }
233 | }
234 |
235 |
236 | public void destroyFloat() {
237 | if (!isDisplay)
238 | return;
239 | if (floatView != null) {
240 | floatView.cancelTimerCount();
241 | }
242 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
243 | windowManager.removeView(floatView);
244 | windowManager = null;
245 | floatView = null;
246 | floatViewClick = null;
247 | isDisplay = false;
248 | instance = null;
249 | }
250 |
251 | }
252 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ftd2009/floatingviewdemo/FloatView.java:
--------------------------------------------------------------------------------
1 | package com.ftd2009.floatingviewdemo;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.graphics.PixelFormat;
6 | import android.preference.PreferenceManager;
7 | import android.util.Log;
8 | import android.view.Gravity;
9 | import android.view.MotionEvent;
10 | import android.view.WindowManager;
11 | import android.view.WindowManager.LayoutParams;
12 | import android.widget.ImageView;
13 |
14 |
15 |
16 | import java.util.Timer;
17 | import java.util.TimerTask;
18 |
19 | public class FloatView extends ImageView {
20 | private float mTouchX;
21 | private float mTouchY;
22 | private float x;
23 | private float y;
24 | private OnClickListener mClickListener;
25 |
26 | private WindowManager windowManager = (WindowManager) getContext()
27 | .getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
28 | // 此windowManagerParams变量为获取的全局变量,用以保存悬浮窗口的属性
29 | private LayoutParams windowManagerParams;
30 |
31 | //保存当前是否为移动模式
32 | private boolean isMove = false;
33 | //保存当前悬浮球在左边还是右边
34 | private boolean isRight = false;
35 |
36 |
37 | private int defaultResource = Utils.getDrawable(getContext(),"zhangyu");
38 | private int focusLeftResource = Utils.getDrawable(getContext(),"zhangyu");
39 | private int focusRightResource =Utils.getDrawable(getContext(),"zhangyu");
40 | private int leftResource =Utils.getDrawable(getContext(),"zhangyu");
41 | private int rightResource =Utils.getDrawable(getContext(),"zhangyu");
42 | private int leftHideResource = Utils.getDrawable(getContext(),"arrowleft");
43 | private int rightHideResource =Utils.getDrawable(getContext(),"arrowright");
44 |
45 | private PreferebceManager mPreferenceManager = null;
46 |
47 | //是否触摸悬浮窗
48 | private boolean isTouch = false;
49 | private Timer timer;
50 | //定时器取消
51 | private boolean isCancel;
52 | private TimerTask timerTask;
53 |
54 | private static final int KEEP_TO_SIDE = 0;
55 | private static final int HIDE = 1;
56 |
57 | public FloatView(Context context,LayoutParams windowManagerParams) {
58 | super(context);
59 | isMove = false;
60 | isRight = false;
61 | this.windowManagerParams = windowManagerParams;
62 | mPreferenceManager = new PreferebceManager(getContext());
63 | //windowManagerParams.type = LayoutParams.TYPE_PHONE; // 设置window type
64 | windowManagerParams.type = LayoutParams.TYPE_PHONE;
65 | //windowManagerParams.type = LayoutParams.TYPE_SYSTEM_ALERT;
66 | //windowManagerParams.type = LayoutParams.TYPE_APPLICATION_PANEL;
67 | windowManagerParams.format = PixelFormat.RGBA_8888; // 设置图片格式,效果为背景透明
68 | // 设置Window flag
69 | windowManagerParams.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL
70 | | LayoutParams.FLAG_NOT_FOCUSABLE
71 | | LayoutParams.FLAG_FULLSCREEN;
72 | //LayoutParams
73 | /*
74 | * 注意,flag的值可以为:
75 | * LayoutParams.FLAG_NOT_TOUCH_MODAL 不影响后面的事件
76 | * LayoutParams.FLAG_NOT_FOCUSABLE 不可聚焦
77 | * LayoutParams.FLAG_NOT_TOUCHABLE 不可触摸
78 | */
79 | // 调整悬浮窗口至左上角,便于调整坐标
80 | windowManagerParams.gravity = Gravity.LEFT | Gravity.TOP;
81 | // 以屏幕左上角为原点,设置x、y初始值
82 | windowManagerParams.x = (int)mPreferenceManager.getFloatX();
83 | windowManagerParams.y = (int)mPreferenceManager.getFloatY();
84 | // 设置悬浮窗口长宽数据
85 | windowManagerParams.width = LayoutParams.WRAP_CONTENT;
86 | windowManagerParams.height = LayoutParams.WRAP_CONTENT;
87 |
88 |
89 | //设置红点
90 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
91 | boolean clickRedPoint=false;
92 | if (!clickRedPoint) {
93 | defaultResource= Utils.getDrawable(getContext(),"zhangyured");
94 | focusLeftResource = Utils.getDrawable(getContext(),"zhangyured");
95 | focusRightResource =Utils.getDrawable(getContext(),"zhangyured");
96 | leftResource =Utils.getDrawable(getContext(),"zhangyured");
97 | rightResource =Utils.getDrawable(getContext(),"zhangyured");
98 | }else {
99 | defaultResource= Utils.getDrawable(getContext(),"zhangyu");
100 | focusLeftResource = Utils.getDrawable(getContext(),"zhangyu");
101 | focusRightResource =Utils.getDrawable(getContext(),"zhangyu");
102 | leftResource =Utils.getDrawable(getContext(),"zhangyu");
103 | rightResource =Utils.getDrawable(getContext(),"zhangyu");
104 | }
105 |
106 |
107 | isRight = mPreferenceManager.isDisplayRight();
108 | if(isRight) {
109 | setImageResource(rightResource);
110 | }else {
111 | setImageResource(leftResource);
112 | }
113 |
114 | if (mPreferenceManager.getFirstFloatView()) {
115 | //第一次登陆出现悬浮球
116 | startTimerCount(6000);
117 | }else {
118 | startTimerCount(3000);
119 | }
120 |
121 | }
122 |
123 | private android.os.Handler handler = new android.os.Handler(){
124 | public void handleMessage(android.os.Message msg) {
125 | switch (msg.what) {
126 | /*case KEEP_TO_SIDE:
127 | setImageResource(leftResource);
128 | cancelTimerCount();
129 | break;*/
130 | case HIDE:
131 | if(isRight){
132 | setImageResource(rightHideResource);
133 | }
134 | else{
135 | setImageResource(leftHideResource);
136 | }
137 | cancelTimerCount();
138 | break;
139 | /*case 2:
140 | windowManager.updateViewLayout(image, windowManagerParams);// 刷新显示
141 | break;*/
142 | }
143 | };
144 | };
145 |
146 | @Override
147 | public boolean onTouchEvent(MotionEvent event) {
148 | isTouch = true;
149 | int statusBarHeight = getStatusHeight(getContext());
150 |
151 | System.out.println("statusBarHeight:"+statusBarHeight);
152 | // 获取相对屏幕的坐标,即以屏幕左上角为原点
153 | x = event.getRawX();
154 | y = event.getRawY()- statusBarHeight; // statusBarHeight是系统状态栏的高度
155 | Log.i("tag", "currX" + x + "====currY" + y);
156 |
157 | int screenWidth = getContext().getResources().getDisplayMetrics().widthPixels;
158 | switch (event.getAction()) {
159 | case MotionEvent.ACTION_DOWN: // 捕获手指触摸按下动作
160 | // 获取相对View的坐标,即以此View左上角为原点
161 | mTouchX = event.getX();
162 | mTouchY = event.getY();
163 | isMove = false;
164 | Log.i("tag", "startX" + mTouchX + "====startY"
165 | + mTouchY);
166 | if(isRight) {
167 | setImageResource(focusRightResource);
168 | } else {
169 | setImageResource(focusLeftResource);
170 | }
171 | cancelTimerCount();
172 | break;
173 |
174 | case MotionEvent.ACTION_MOVE: // 捕获手指触摸移动动作
175 | int xMove = Math.abs((int) (event.getX() - mTouchX));
176 | int yMove = Math.abs((int) (event.getY() - mTouchY));
177 | if(xMove > 100 || yMove >100) {
178 | isMove = true;
179 | if(onMoveListener!=null) {
180 | onMoveListener.onMove();
181 | }
182 | setImageResource(defaultResource);
183 | updateViewPosition();
184 | }
185 | Log.e("fv", "isMove:"+isMove);
186 |
187 | if (x<100&&(event.getX() - mTouchX)<-10){
188 | isMove = true;
189 | if(onMoveListener!=null) {
190 | onMoveListener.onMove();
191 | }
192 | }
193 | if (x>(screenWidth-100)&&(event.getX() - mTouchX)>50){
194 | isMove = true;
195 | if(onMoveListener!=null) {
196 | onMoveListener.onMove();
197 | }
198 | }
199 | break;
200 | case MotionEvent.ACTION_UP: // 捕获手指触摸离开动作
201 | isTouch = false;
202 | if(isMove) {
203 | isMove = false;
204 | float halfScreen = screenWidth/2;
205 | if(x <= halfScreen) {
206 | if (x<100&&(event.getX() - mTouchX)<-10){
207 | setImageResource(leftHideResource);
208 | }else {
209 | setImageResource(leftResource);
210 | }
211 | x = 0 ;
212 | isRight = false;
213 | } else {
214 | if (x>(screenWidth-100)&&(event.getX() - mTouchX)>50){
215 | setImageResource(rightHideResource);
216 | }else {
217 | setImageResource(rightResource);
218 | }
219 |
220 | //x = screenWidth+Math.abs((int)mTouchX);
221 | x = screenWidth+Math.abs((int)mTouchX)+getNavigationHeight(getContext());
222 | //x = screenWidth+getNavigationHeight(getContext());
223 | isRight = true;
224 | }
225 | updateViewPosition();
226 | mPreferenceManager.setFloatX(x);
227 | mPreferenceManager.setFloatY(y);
228 | mPreferenceManager.setDisplayRight(isRight);
229 | startTimerCount(3000);
230 | } else {
231 | if(isRight) {
232 | setImageResource(rightResource);
233 | }else {
234 | setImageResource(leftResource);
235 | }
236 | try {
237 | Thread.sleep(100);
238 | } catch (InterruptedException e) {
239 | e.printStackTrace();
240 | }
241 | if(mClickListener!=null) {
242 | mClickListener.onClick(this);
243 | }
244 | }
245 |
246 | mTouchX = mTouchY = 0;
247 | break;
248 | }
249 | return true;
250 | }
251 | @Override
252 | public void setOnClickListener(OnClickListener l) {
253 | this.mClickListener = l;
254 | }
255 | public interface OnMoveListener{
256 | public abstract void onMove();
257 | }
258 | private OnMoveListener onMoveListener;
259 | public void setOnMoveListener(OnMoveListener m){
260 | this.onMoveListener = m;
261 | }
262 | private void updateViewPosition() {
263 | // 更新浮动窗口位置参数
264 | windowManagerParams.x = (int) (x - mTouchX);
265 | windowManagerParams.y = (int) (y - mTouchY);
266 | windowManager.updateViewLayout(this, windowManagerParams); // 刷新显示
267 | }
268 |
269 | public void startTimerCount(long delay){
270 | isCancel = false;
271 | timer = new Timer();
272 | timerTask = new TimerTask() {
273 | @Override
274 | public void run() {
275 | if(!isTouch&&!isCancel){
276 | handler.sendEmptyMessage(HIDE);
277 | }
278 | }
279 | };
280 | timer.schedule(timerTask, delay);
281 | }
282 |
283 | public void cancelTimerCount(){
284 | isCancel = true;
285 | if(timer!=null){
286 | timer.cancel();
287 | timer =null;
288 | }
289 | if(timerTask!=null){
290 | timerTask.cancel();
291 | timerTask = null;
292 | }
293 | }
294 |
295 | /**
296 | * 获得状态栏的高度
297 | * @param context
298 | * @return
299 | */
300 | public static int getStatusHeight(Context context) {
301 | int statusHeight = -1;
302 | try
303 | {
304 | Class> clazz = Class.forName("com.android.internal.R$dimen");
305 | Object object = clazz.newInstance();
306 | int height = Integer.parseInt(clazz.getField("status_bar_height")
307 | .get(object).toString());
308 | statusHeight = context.getResources().getDimensionPixelSize(height);
309 | } catch (Exception e)
310 | {
311 | e.printStackTrace();
312 | }
313 | return statusHeight;
314 | }
315 |
316 |
317 | /**
318 | * 获得导航栏的高度
319 | * @param context
320 | * @return
321 | */
322 | public static int getNavigationHeight(Context context) {
323 | int statusHeight = 0;
324 | int resourceId=context.getResources().getIdentifier("navigation_bar_height", "dimen", "android");;
325 | if (resourceId>0) {
326 | statusHeight=context.getResources().getDimensionPixelSize(resourceId);
327 | }
328 | return statusHeight;
329 | }
330 | }
331 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ftd2009/floatingviewdemo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.ftd2009.floatingviewdemo;
2 |
3 | import android.os.Bundle;
4 | import android.support.design.widget.FloatingActionButton;
5 | import android.support.design.widget.Snackbar;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.support.v7.widget.Toolbar;
8 | import android.view.View;
9 | import android.view.Menu;
10 | import android.view.MenuItem;
11 |
12 | public class MainActivity extends AppCompatActivity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_main);
18 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
19 | setSupportActionBar(toolbar);
20 |
21 | FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
22 | fab.setOnClickListener(new View.OnClickListener() {
23 | @Override
24 | public void onClick(View view) {
25 | Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
26 | .setAction("Action", null).show();
27 | }
28 | });
29 |
30 |
31 | findViewById(R.id.tv_add).setOnClickListener(new View.OnClickListener() {
32 | @Override
33 | public void onClick(View view) {
34 | FloatManager.getFloatManager(MainActivity.this).createView();
35 | }
36 | });
37 |
38 | findViewById(R.id.tv_remove).setOnClickListener(new View.OnClickListener() {
39 | @Override
40 | public void onClick(View view) {
41 | FloatManager.getFloatManager(MainActivity.this).destroyFloat();
42 | }
43 | });
44 |
45 | }
46 |
47 | @Override
48 | public boolean onCreateOptionsMenu(Menu menu) {
49 | // Inflate the menu; this adds items to the action bar if it is present.
50 | getMenuInflater().inflate(R.menu.menu_main, menu);
51 | return true;
52 | }
53 |
54 | @Override
55 | public boolean onOptionsItemSelected(MenuItem item) {
56 | // Handle action bar item clicks here. The action bar will
57 | // automatically handle clicks on the Home/Up button, so long
58 | // as you specify a parent activity in AndroidManifest.xml.
59 | int id = item.getItemId();
60 |
61 | //noinspection SimplifiableIfStatement
62 | if (id == R.id.action_settings) {
63 | return true;
64 | }
65 |
66 | return super.onOptionsItemSelected(item);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ftd2009/floatingviewdemo/PreferebceManager.java:
--------------------------------------------------------------------------------
1 | package com.ftd2009.floatingviewdemo;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.content.SharedPreferences.Editor;
6 |
7 | public class PreferebceManager {
8 | private Context mContext;
9 |
10 | public PreferebceManager(Context context) {
11 | mContext = context;
12 | }
13 |
14 | /**
15 | * get the shared proferences for getting or setting
16 | *
17 | * @return
18 | */
19 | private SharedPreferences getSharedPreferences() {
20 | return mContext.getSharedPreferences(Constants.PERFERENCE_NAME,
21 | Context.MODE_PRIVATE);
22 | }
23 |
24 | /**
25 | * get the editor for saving the key value
26 | *
27 | * @return
28 | */
29 | private Editor getEditer() {
30 | return getSharedPreferences().edit();
31 | }
32 |
33 | public float getFloatX() {
34 | SharedPreferences swg = getSharedPreferences();
35 |
36 | return swg.getFloat(Constants.PREF_KEY_FLOAT_X, 0f);
37 | }
38 |
39 | public void setFloatX(float x) {
40 | Editor editor = getEditer();
41 | editor.putFloat(Constants.PREF_KEY_FLOAT_X, x);
42 | editor.commit();
43 | }
44 |
45 | public float getFloatY() {
46 | SharedPreferences swg = getSharedPreferences();
47 |
48 | return swg.getFloat(Constants.PREF_KEY_FLOAT_Y, 0f);
49 | }
50 |
51 | public void setFloatY(float y) {
52 | Editor editor = getEditer();
53 | editor.putFloat(Constants.PREF_KEY_FLOAT_Y, y);
54 | editor.commit();
55 | }
56 |
57 | public boolean onlyDisplayOnHome() {
58 | SharedPreferences swg = getSharedPreferences();
59 |
60 | return swg.getBoolean(Constants.PREF_KEY_DISPLAY_ON_HOME, true);
61 | }
62 |
63 | public void setDisplayOnHome(boolean onlyDisplayOnHome) {
64 | Editor editor = getEditer();
65 | editor.putBoolean(Constants.PREF_KEY_DISPLAY_ON_HOME, onlyDisplayOnHome);
66 | editor.commit();
67 | }
68 |
69 | public boolean isDisplayRight() {
70 | SharedPreferences swg = getSharedPreferences();
71 |
72 | return swg.getBoolean(Constants.PREF_KEY_IS_RIGHT, false);
73 | }
74 |
75 | public void setDisplayRight(boolean isRight) {
76 | Editor editor = getEditer();
77 | editor.putBoolean(Constants.PREF_KEY_IS_RIGHT, isRight);
78 | editor.commit();
79 | }
80 |
81 | public boolean getGetGiftClick() {
82 | SharedPreferences swg = getSharedPreferences();
83 | return swg.getBoolean(Constants.PREF_KEY_GIFT_CLICK, false);
84 | }
85 |
86 | public void setGetGiftClick(boolean hasClick) {
87 | Editor editor = getEditer();
88 | editor.putBoolean(Constants.PREF_KEY_GIFT_CLICK, hasClick);
89 | editor.commit();
90 | }
91 |
92 | public String getGameId() {
93 | SharedPreferences swg = getSharedPreferences();
94 | return swg.getString(Constants.PREF_KEY_GAME_ID, "game2345");
95 | }
96 |
97 | public void setGameId(String gameId) {
98 | Editor editor = getEditer();
99 | editor.putString(Constants.PREF_KEY_GAME_ID, gameId);
100 | editor.commit();
101 | }
102 |
103 | // 活动红点:活动点过红点消失
104 | public boolean hasRedPointClicked() {
105 | SharedPreferences swg = getSharedPreferences();
106 | return swg.getBoolean(Constants.PREF_KEY_RED_POINT_EVENT, false);
107 | }
108 |
109 | public void setRedPointClicked(boolean b) {
110 | Editor editor = getEditer();
111 | editor.putBoolean(Constants.PREF_KEY_RED_POINT_EVENT, b);
112 | editor.commit();
113 | }
114 |
115 | // 游戏包名
116 | public String getGamePackageName() {
117 | SharedPreferences swg = getSharedPreferences();
118 | return swg.getString(Constants.GAME_PACKAGE_NAME, "");
119 | }
120 |
121 | public void setGamePackageName(String s) {
122 | Editor editor = getEditer();
123 | editor.putString(Constants.GAME_PACKAGE_NAME, s);
124 | editor.commit();
125 | }
126 |
127 | // 是否第一次出现悬浮球
128 | public boolean getFirstFloatView() {
129 | SharedPreferences swg = getSharedPreferences();
130 | boolean firstFloatView=swg.getBoolean(Constants.FIRST_FLOAT_VIEW, true);
131 | if (firstFloatView) {
132 | Editor editor = getEditer();
133 | editor.putBoolean(Constants.FIRST_FLOAT_VIEW, false);
134 | editor.commit();
135 | }
136 | return firstFloatView;
137 | }
138 |
139 | public void deleteFirstFloatView() {
140 | Editor editor = getEditer();
141 | editor.remove(Constants.FIRST_FLOAT_VIEW);
142 | editor.commit();
143 | }
144 | }
145 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ftd2009/floatingviewdemo/Utils.java:
--------------------------------------------------------------------------------
1 | package com.ftd2009.floatingviewdemo;
2 |
3 | import java.io.File;
4 | import java.io.FileInputStream;
5 | import java.io.UnsupportedEncodingException;
6 | import java.math.BigDecimal;
7 | import java.security.MessageDigest;
8 | import java.security.NoSuchAlgorithmException;
9 | import java.util.List;
10 | import java.util.Scanner;
11 | import java.util.regex.Matcher;
12 | import java.util.regex.Pattern;
13 |
14 | import android.annotation.SuppressLint;
15 | import android.content.ClipData;
16 | import android.content.ClipboardManager;
17 | import android.content.Context;
18 | import android.content.Intent;
19 | import android.content.pm.PackageInfo;
20 | import android.content.pm.PackageManager;
21 | import android.net.ConnectivityManager;
22 | import android.net.NetworkInfo;
23 | import android.net.Uri;
24 | import android.os.Build;
25 | import android.os.Environment;
26 | import android.os.StatFs;
27 | import android.text.TextUtils;
28 | import android.util.Base64;
29 | import android.util.Log;
30 |
31 | public class Utils {
32 |
33 | private static final String SUFFIX = "_belongto2345";
34 |
35 | private static long lastClickTime;
36 |
37 | /**
38 | * 根据手机的分辨率从 dp 的单位 转成为 px(像素)
39 | */
40 | public static int dip2px(Context context, float dpValue) {
41 | final float scale = context.getResources().getDisplayMetrics().density;
42 | return (int) (dpValue * scale + 0.5f);
43 | }
44 |
45 | /**
46 | * 根据手机的分辨率从 px(像素) 的单位 转成为 dp
47 | */
48 | public static int px2dip(Context context, float pxValue) {
49 | final float scale = context.getResources().getDisplayMetrics().density;
50 | return (int) (pxValue / scale + 0.5f);
51 | }
52 |
53 |
54 | public static boolean isFastDoubleClick() {
55 | long time = System.currentTimeMillis();
56 | long timeD = time - lastClickTime;
57 | if ( 0 < timeD && timeD < 1000) {
58 | return true;
59 | }
60 | lastClickTime = time;
61 | return false;
62 | }
63 |
64 | /**
65 | * 拷贝到剪切板
66 | *
67 | * @param content
68 | */
69 | @SuppressLint("NewApi")
70 | public static void copy(Context context,CharSequence content) {
71 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
72 | // 得到剪贴板管理器
73 | ClipboardManager cmb = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
74 | cmb.setPrimaryClip(ClipData.newPlainText(null, content));
75 | } else {
76 | android.text.ClipboardManager cmb = (android.text.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
77 | cmb.setText(content);
78 | }
79 |
80 | }
81 |
82 | public static boolean notInstalled( Context context, String packageName )
83 | {
84 | PackageManager packageManager = context.getPackageManager();
85 | // 获取所有已安装程序的包信息
86 | List pinfo = packageManager.getInstalledPackages(0);
87 | for ( int i = 0; i < pinfo.size(); i++ )
88 | {
89 | if(pinfo.get(i).packageName.equalsIgnoreCase(packageName))
90 | return false;
91 | }
92 | return true;
93 | }
94 |
95 | public static boolean isMobileNO(String mobiles) {
96 | String str="^((13[0-9])|(14[0-9])|(17[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";
97 | Pattern p = Pattern
98 | .compile(str);
99 | Matcher m = p.matcher(mobiles);
100 | return m.matches();
101 | }
102 |
103 | public static void openUrlWithBrowser(String url,Context context){
104 | Intent intent= new Intent();
105 | intent.setAction(Intent.ACTION_VIEW);
106 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
107 | Uri content_url = Uri.parse(url);
108 | intent.setData(content_url);
109 | context.startActivity(intent);
110 |
111 | }
112 |
113 | public static int getDrawable(Context context,String name){
114 | // int i = context.getResources().getIdentifier(name, "drawable", context.getPackageName());
115 | // Log.i("janan", "drawable类型:"+name+"--"+i);
116 | // return i;
117 | return context.getResources().getIdentifier(name+SUFFIX, "drawable", context.getPackageName());
118 | }
119 |
120 | public static int getDimens(Context context ,String name){
121 | // int i = context.getResources().getIdentifier(name, "dimen", context.getPackageName());
122 | // Log.i("janan", "dimen类型:"+name+"--"+i);
123 | // return i;
124 | return context.getResources().getIdentifier(name+SUFFIX, "dimen", context.getPackageName());
125 | }
126 |
127 | public static int getId(Context context ,String name){
128 | // int i = context.getResources().getIdentifier(name, "id", context.getPackageName());
129 | // Log.i("janan", "id类型:"+name+"--"+i);
130 | // return i;
131 | return context.getResources().getIdentifier(name+SUFFIX, "id", context.getPackageName());
132 | }
133 |
134 | public static int getLayout(Context context ,String name){
135 | // int i = context.getResources().getIdentifier(name, "layout", context.getPackageName());
136 | // Log.i("janan", "layout类型:"+name+"--"+i);
137 | // return i;
138 | return context.getResources().getIdentifier(name+SUFFIX, "layout", context.getPackageName());
139 | }
140 |
141 | public static int getStyle(Context context ,String name){
142 | int i = context.getResources().getIdentifier(name, "style", context.getPackageName());
143 | Log.i("janan", "style类型:"+name+"--"+i);
144 | return i;
145 | // return context.getResources().getIdentifier(name, "style", context.getPackageName());
146 | }
147 |
148 | public static int getString(Context context,String name){
149 | // int i = context.getResources().getIdentifier(name, "string", context.getPackageName());
150 | // Log.i("janan", "string类型:"+name+"--"+i);
151 | // return i;
152 | return context.getResources().getIdentifier(name+SUFFIX, "string", context.getPackageName());
153 | }
154 |
155 | public static int getColor(Context context ,String name){
156 | // int i = context.getResources().getIdentifier(name, "color", context.getPackageName());
157 | // Log.i("janan", "color类型:"+name+"--"+i);
158 | // return i;
159 | return context.getResources().getIdentifier(name+SUFFIX, "color", context.getPackageName());
160 | }
161 |
162 | /**
163 | * 加密
164 | *
165 | * @param str
166 | */
167 | public static String strCode(String str) {
168 |
169 | String hash = "N#gK3OgTw#eRUI8+8bZsti78P==4s.5";
170 | String key = Md5(hash);
171 |
172 | byte[] bstr = str.getBytes();
173 |
174 | int keylen = key.length();
175 | int strlen = bstr.length;
176 |
177 | byte resultByte[] = new byte[bstr.length];
178 | for (int i = 0; i < strlen; i++) {
179 | int k = i % keylen;
180 | int x = bstr[i];
181 | int y = key.charAt(k);
182 | byte z = (byte) (x ^ y);
183 | resultByte[i] = z;
184 | }
185 |
186 | try {
187 | String r = new String(Base64.encode(resultByte, Base64.DEFAULT), "utf-8");
188 | return r;
189 | } catch (UnsupportedEncodingException e) {
190 | e.printStackTrace();
191 | }
192 | return "";
193 | }
194 |
195 |
196 | /**
197 | * MD5的算法在RFC1321 中定义 在RFC 1321中,给出了Test suite用来检验你的实现是否正确: MD5 ("") =
198 | * d41d8cd98f00b204e9800998ecf8427e MD5 ("a") =
199 | * 0cc175b9c0f1b6a831c399e269772661 MD5 ("abc") =
200 | * 900150983cd24fb0d6963f7d28e17f72 MD5 ("message digest") =
201 | * f96b697d7cb7938d525a2f31aaf161d0 MD5 ("abcdefghijklmnopqrstuvwxyz") =
202 | * c3fcd3d76192e4007dfb496cca67e13b
203 | *
204 | * @author haogj
205 | *
206 | * 传入参数:一个字节数组 传出参数:字节数组的 MD5 结果字符串
207 | */
208 | public static String Md5(String plainText)
209 | {
210 | try
211 | {
212 | MessageDigest md = MessageDigest.getInstance("MD5");
213 | md.update(plainText.getBytes());
214 | byte b[] = md.digest();
215 | int i;
216 | StringBuffer buf = new StringBuffer("");
217 | for (int offset = 0; offset < b.length; offset++)
218 | {
219 | i = b[offset];
220 | if (i < 0)
221 | i += 256;
222 | if (i < 16)
223 | buf.append("0");
224 | buf.append(Integer.toHexString(i));
225 | }
226 | return buf.toString();
227 | }
228 | catch (NoSuchAlgorithmException e)
229 | {
230 | e.printStackTrace();
231 | }
232 | return null;
233 | }
234 |
235 | /**
236 | * Returns whether the network is available
237 | *
238 | * @param context
239 | * Context
240 | * @return 网络是否可用
241 | * @see [类、类#方法、类#成员]
242 | */
243 | public static boolean isNetworkAvailable(Context context)
244 | {
245 | ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
246 | if (connectivity == null)
247 | {
248 | }
249 | else
250 | {
251 | NetworkInfo[] info = connectivity.getAllNetworkInfo();
252 | if (info != null)
253 | {
254 | for (int i = 0; i < info.length; i++)
255 | {
256 | if (info[i].getState() == NetworkInfo.State.CONNECTED)
257 | {
258 | return true;
259 | }
260 | }
261 | }
262 | }
263 |
264 | return false;
265 | }
266 |
267 |
268 | public static String getLocalFileMd5(String mFileName) {
269 | if (TextUtils.isEmpty(mFileName)) {
270 | return "";
271 | }
272 | File file = new File(mFileName);
273 | if (!file.isFile()) {
274 | return "";
275 | }
276 | return getLocalFileMd5(file);
277 | }
278 |
279 | public static String getLocalFileMd5(File file) {
280 | if (file != null && file.exists()) {
281 | MessageDigest digest = null;
282 | FileInputStream in = null;
283 | byte buffer[] = new byte[1024];
284 | int len;
285 | try {
286 | digest = MessageDigest.getInstance("MD5");
287 | in = new FileInputStream(file);
288 | while ((len = in.read(buffer, 0, 1024)) != -1) {
289 | digest.update(buffer, 0, len);
290 | }
291 | in.close();
292 | } catch (Exception e) {
293 | e.printStackTrace();
294 | return "";
295 | }
296 | return convertToHex(digest.digest());
297 | }
298 | return "";
299 | }
300 |
301 |
302 | /**
303 | * Convert byte array to Hex string
304 | */
305 | private static String convertToHex(byte[] data) {
306 | StringBuilder buf = new StringBuilder();
307 | for (int i = 0; i < data.length; i++) {
308 | int halfbyte = (data[i] >>> 4) & 0x0F;
309 | int two_halfs = 0;
310 | do {
311 | if ((0 <= halfbyte) && (halfbyte <= 9))
312 | buf.append((char) ('0' + halfbyte));
313 | else
314 | buf.append((char) ('a' + (halfbyte - 10)));
315 | halfbyte = data[i] & 0x0F;
316 | } while (two_halfs++ < 1);
317 | }
318 | return buf.toString();
319 | }
320 |
321 |
322 | /**
323 | * 全局单位统一
324 | *
325 | * @param fileSize
326 | * @return
327 | */
328 | public static String formatFileSizeToString(long fileSize) {// 转换文件大小
329 | String fileSizeString = "";
330 |
331 | if (fileSize <= 1 * 1024) {
332 | fileSizeString = "1" + "KB";
333 | } else if (fileSize <= (800 * 1024)) {
334 | fileSizeString = fileSize / 1024 + "KB";
335 | } else if (fileSize <= (800 * 1024 * 1024)) {
336 | fileSizeString = String.format("%.2f",
337 | ((float) fileSize / (1 * 1024 * 1024))) + "MB";
338 | } else {
339 | // 直接除以 800 * 1024 * 1024 * 1024 会出错,乘积太大
340 | double size = (float) fileSize / (1 * 1024 * 1024 * 1024);
341 | if (size <= 800) {
342 | fileSizeString = String.format("%.2f", size) + "GB";
343 | } else {
344 | fileSizeString = String.format("%.2f", size / 1024) + "TB";
345 | }
346 | }
347 |
348 | return fileSizeString;
349 | }
350 |
351 | public static long parseFileLength(String fileLength) {
352 | if (!TextUtils.isEmpty(fileLength)) {
353 | String fileEnd = fileLength.substring(fileLength.length() - 2, fileLength.length());
354 | String fileNum = fileLength.substring(0, fileLength.length() - 2);
355 | if ("MB".equalsIgnoreCase(fileEnd)) {
356 | BigDecimal bd = new BigDecimal(Float.parseFloat(fileNum) * 1024 * 1024);
357 | bd = bd.setScale(2, 5);
358 | return bd.longValue();
359 | } else if ("KB".equalsIgnoreCase(fileEnd)) {
360 | BigDecimal bd = new BigDecimal(Float.parseFloat(fileNum) * 1024);
361 | bd = bd.setScale(2, 5);
362 | return bd.longValue();
363 | } else if ("GB".equalsIgnoreCase(fileEnd)) {
364 | BigDecimal bd = new BigDecimal(Float.parseFloat(fileNum) * 1024 * 1024 * 1024);
365 | bd = bd.setScale(2, 5);
366 | return bd.longValue();
367 | }
368 | }
369 | return -1;
370 | }
371 |
372 |
373 |
374 | /**
375 | * Android 安装应用
376 | *
377 | * @param context Application Context
378 | */
379 | public static void installApk(final Context context, File file, String sid) {
380 | if (file.exists()) {
381 | try {
382 | String[] args1 = {"chmod", "771", file.getPath().substring(0, file.getPath().lastIndexOf("/"))};
383 | Process p1 = Runtime.getRuntime().exec(args1);
384 | p1.waitFor();
385 | p1.destroy();
386 | String[] args2 = {"chmod", "777", file.getPath()};
387 | Process p2 = Runtime.getRuntime().exec(args2);
388 | p2.waitFor();
389 | p2.destroy();
390 | } catch (Exception e) {
391 | e.printStackTrace();
392 | }
393 |
394 | startInstall(context, file.getAbsolutePath());
395 | }
396 | }
397 |
398 |
399 | public static void startInstall(Context context, String filePath) {
400 | if (null == context || null == filePath) {
401 | return;
402 | }
403 |
404 | Intent i = new Intent();
405 | String uriStr = "file://" + filePath;
406 | // v3.3暂时不加
407 | // if (Utils.isMiUi() && isClzExist() && !Utils.isNonMarketAppsAllowed(context)) {
408 | // i.setClass(context, InstallTipDialog.class);
409 | // i.putExtra(URI_KEY, uriStr);
410 | // i.putExtra(SHOW_KEY, true);
411 | // } else {
412 | i.setAction(Intent.ACTION_VIEW);
413 | i.setDataAndType(Uri.parse(uriStr), "application/vnd.android.package-archive");
414 | // }
415 |
416 | i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
417 |
418 | if (!context.getPackageManager().queryIntentActivities(i, 0).isEmpty()) {
419 | try {
420 | context.startActivity(i);
421 | } catch (Exception e) {
422 | e.printStackTrace();
423 | }
424 | }
425 | }
426 |
427 |
428 | public static boolean isSDCardExist() {
429 | return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
430 | }
431 |
432 | // 内存剩余空间
433 | public static long getAvailableInternalMemorySize() {
434 | File path = Environment.getDataDirectory();
435 | StatFs stat = new StatFs(path.getPath());
436 | long blockSize = stat.getBlockSize();
437 | long availableBlocks = stat.getAvailableBlocks();
438 | return availableBlocks * blockSize;
439 | }
440 |
441 | // 内存总空间
442 | public static long getTotalInternalMemorySize() {
443 | File path = Environment.getDataDirectory();
444 | StatFs stat = new StatFs(path.getPath());
445 | long blockSize = stat.getBlockSize();
446 | long totalBlocks = stat.getBlockCount();
447 | return totalBlocks * blockSize;
448 | }
449 |
450 | // SD卡剩余空间
451 | public static long getAvailableExternalMemorySize() {
452 | if (isSDCardExist()) {
453 | File path = Environment.getExternalStorageDirectory();
454 | StatFs stat = new StatFs(path.getPath());
455 | long blockSize = stat.getBlockSize();
456 | long availableBlocks = stat.getAvailableBlocks();
457 | return availableBlocks * blockSize;
458 | } else {
459 | long fstab = -1;
460 | try {
461 | File mountFile = new File("/etc/vold.fstab");
462 | if (mountFile.exists()) {
463 | Scanner scanner = new Scanner(mountFile);
464 | try {
465 | while (scanner.hasNext()) {
466 | String line = scanner.nextLine();
467 | if (line.startsWith("dev_mount")) {
468 | String[] lineElements = line.split(" ");
469 | if (lineElements.length > 3) {
470 | String element = lineElements[1];
471 | if (element.equals("sdcard")) {
472 | File f = new File(lineElements[2]);
473 | if (null != f.listFiles()) {
474 | StatFs stat = new StatFs(f.getPath());
475 | long blockSize = stat.getBlockSize();
476 | long totalBlocks = stat.getBlockCount();
477 | return totalBlocks * blockSize;
478 | }
479 | }
480 | }
481 | }
482 | }
483 | } finally {
484 | scanner.close();
485 | }
486 | }
487 | } catch (Exception e) {
488 | e.printStackTrace();
489 | }
490 | return fstab;
491 | }
492 | }
493 |
494 | // SD卡总空间
495 | public static long getTotalExternalMemorySize() {
496 | if (isSDCardExist()) {
497 | File path = Environment.getExternalStorageDirectory();
498 | StatFs stat = new StatFs(path.getPath());
499 | long blockSize = stat.getBlockSize();
500 | long totalBlocks = stat.getBlockCount();
501 | return totalBlocks * blockSize;
502 | } else {
503 | return -1;
504 | }
505 | }
506 |
507 | /**
508 | * 递归删除目录
509 | *
510 | * @param file
511 | */
512 | public static void deleteDir(File file) {
513 | if (file.exists()) {
514 | if (file.isDirectory()) {
515 | File[] files = file.listFiles();
516 | if (files != null) {
517 | for (File subFile : files) {
518 | if (subFile.isDirectory())
519 | deleteDir(subFile);
520 | else
521 | subFile.delete();
522 | }
523 | }
524 | }
525 | file.delete();
526 | }
527 | }
528 |
529 |
530 | }
531 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/_2345icon_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/_2345icon_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/activity_belongto2345.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/activity_belongto2345.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/activity_default_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/activity_default_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/activity_seclected_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/activity_seclected_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/apps_count_num_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/apps_count_num_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/arrowleft_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/arrowleft_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/arrowright_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/arrowright_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/back_menu_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/back_menu_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/back_menu_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/back_menu_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/back_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/back_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/back_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/back_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/background_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/background_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/backlogin_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/backlogin_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btn_normal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btn_normal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btn_press_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btn_press_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btnblue_default_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btnblue_default_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btngreen_normal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btngreen_normal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btngreen_press_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btngreen_press_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btngrey_normal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btngrey_normal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btngrey_press_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btngrey_press_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btngreydefault_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btngreydefault_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btnorange_normal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btnorange_normal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btnorange_press_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btnorange_press_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/btnrefresh_press_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/btnrefresh_press_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/charge_default_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/charge_default_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/charge_selected_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/charge_selected_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/checkbox_selected_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/checkbox_selected_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/checkbox_unselected_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/checkbox_unselected_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/close_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/close_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/close_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/close_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/customerservice_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/customerservice_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dialog_bg_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dialog_bg_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dialog_closed_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dialog_closed_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dialog_closed_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dialog_closed_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzone_activity_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzone_activity_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzone_activity_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzone_activity_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzone_charge_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzone_charge_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzone_charge_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzone_charge_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzone_gift_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzone_gift_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzone_gift_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzone_gift_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzone_person_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzone_person_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzone_person_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzone_person_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzonebg_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzonebg_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/dropzonebg_left_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/dropzonebg_left_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/floatview.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/floatview.gif
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/forward_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/forward_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/forward_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/forward_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/gift_default_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/gift_default_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/gift_get_success_bg_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/gift_get_success_bg_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/gift_selected_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/gift_selected_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/horizontal_zhezao_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/horizontal_zhezao_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/horizontalscreenbg_belongto2345.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/horizontalscreenbg_belongto2345.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/horizontalselectbarbg_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/horizontalselectbarbg_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_get_gift_success_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/icon_get_gift_success_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/loading_bg_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/loading_bg_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/loading_logo_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/loading_logo_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/loginpassword_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/loginpassword_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/loginuser_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/loginuser_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/logo_landscape_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/logo_landscape_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/logo_portrait1_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/logo_portrait1_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/logo_portrait_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/logo_portrait_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/nogift_defalut_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/nogift_defalut_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/nonetwork_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/nonetwork_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/packagecode_belongto2345.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/packagecode_belongto2345.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/password_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/password_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/passwordnotshow_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/passwordnotshow_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/passwordnotshow_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/passwordnotshow_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/passwordnotshow_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/passwordnotshow_press.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/passwordnotshow_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/passwordnotshow_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/passwordshow_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/passwordshow_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/passwordshow_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/passwordshow_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/passwordshow_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/passwordshow_press.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/passwordshow_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/passwordshow_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/personalcenter_default_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/personalcenter_default_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/personalcenter_selected_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/personalcenter_selected_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/phone_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/phone_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/portraitselectbarbg_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/portraitselectbarbg_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/progress_bg_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/progress_bg_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/qqlogin_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/qqlogin_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/qqlogin_bg_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/qqlogin_bg_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/qqlogin_bg_normal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/qqlogin_bg_normal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/qqlogin_bg_press.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/qqlogin_bg_press.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/qqlogin_bg_press_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/qqlogin_bg_press_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/refreshbtn_normal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/refreshbtn_normal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/returnlogin_bg_normal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/returnlogin_bg_normal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/returnlogin_bg_press_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/returnlogin_bg_press_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_arrowdown_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_arrowdown_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_arrowdown_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_arrowdown_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_arrowup_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_arrowup_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_arrowup_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_arrowup_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_bg_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_bg_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_bg_error_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_bg_error_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_bg_normal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_bg_normal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_bg_select_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_bg_select_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_close_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_close_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_close_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_close_press.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_closed_normal_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_closed_normal_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/textbox_closed_press_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/textbox_closed_press_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/titlebutton_nomal_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/titlebutton_nomal_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/titlebutton_press_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/titlebutton_press_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/toast_bg_belongto2345.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/toast_bg_belongto2345.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/toast_icon_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/toast_icon_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/touxiangzhezao_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/touxiangzhezao_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/user_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/user_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/vertical_zhezao_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/vertical_zhezao_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/verticalscreenbg_belongto2345.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/verticalscreenbg_belongto2345.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/warningicon_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/warningicon_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/zhangyu_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/zhangyu_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/zhangyu_selected_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/zhangyu_selected_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/zhangyured_belongto2345.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/drawable-xhdpi/zhangyured_belongto2345.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gift_clip.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/my_progress_style_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
11 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_backbutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_canclebinding_button_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_chargecenterradiobutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_checkbox_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_dialogclosebutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_downusersback_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_downuserstext_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_edittextback_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_eventcenter_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_eventcenterradiobutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_eventdialogclosebutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_floatingbackbutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_floatingbacktext_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_forward_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_getgift_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_gift_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_giftradiobackground_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_giftradiobackground_portrait_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_giftradiobutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_giftradiobuttontext_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_paycenter_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_private_item_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_privatecenter_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_privatecenterradiobutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_privatecentertext_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_qqbutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_refresh_bg_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_signinbutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_submitbutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_textclosebutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_titlebutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_titlebuttontextcolor_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_usereditdown_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_usereditup_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_backframe_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_cornerbutton_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_cornerframe_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_cursor_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
22 |
23 |
24 |
25 |
26 |
27 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
21 |
22 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/float_window_big_belongto2345.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
17 |
27 |
35 |
46 |
47 |
48 |
49 |
55 |
63 |
74 |
75 |
76 |
77 |
83 |
96 |
104 |
115 |
116 |
117 |
118 |
124 |
132 |
142 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #297acc
8 | #ffffff
9 | #2163a6
10 | #e8b932
11 | #ffffff
12 | #000000
13 | #737373
14 | #00000000
15 | #3097fd
16 | #fafbfc
17 | #95c9fd
18 | #666666
19 |
20 | #737373
21 | #e8b932
22 |
23 | #3097fd
24 | #E6E6E6
25 |
26 | #3097fd
27 | #ccFFFFFF
28 |
29 | #ffffff
30 |
31 | #99ffffff
32 |
33 |
34 | #800f1a26
35 |
36 | #00000000
37 | #06223e
38 |
39 | #ffffff
40 | #f5f5f5
41 |
42 | #b2b2b2
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | FloatingViewDemo
3 | Settings
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/test/java/com/ftd2009/floatingviewdemo/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.ftd2009.floatingviewdemo;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.1.2'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yjiang2009/FloatingViewDemo/000b19619c20e940ab093dd83fc532beae176765/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
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.10-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 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/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 ':app'
2 |
--------------------------------------------------------------------------------