4">54
+
+ @Override
+ public void onClick(View v) {
+ switch (v.getId()){
+ case R.id.btn_cancel_delete:
+ dismiss();
+ break;
+ case R.id.btn_exit_session_confirm:
+ dismiss();
+ if(listener!=null){
+ listener.onClick(v);
+ }
+ break;
+ }
+ }
+}
@@ -0,0 +1,8 @@ |
||
| 1 |
+<?xml version="1.0" encoding="utf-8"?> |
|
| 2 |
+<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
|
| 3 |
+ |
|
| 4 |
+ <item android:drawable="@drawable/btn_cancel_press" android:state_focused="true"/> |
|
| 5 |
+ <item android:drawable="@drawable/btn_cancel_press" android:state_pressed="true"/> |
|
| 6 |
+ <item android:drawable="@drawable/btn_cancel_normal"/> |
|
| 7 |
+ |
|
| 8 |
+</selector> |
@@ -0,0 +1,8 @@ |
||
| 1 |
+<?xml version="1.0" encoding="utf-8"?> |
|
| 2 |
+<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
|
| 3 |
+ |
|
| 4 |
+ <item android:drawable="@drawable/pop_btn_ok_press" android:state_focused="true"/> |
|
| 5 |
+ <item android:drawable="@drawable/pop_btn_ok_press" android:state_pressed="true"/> |
|
| 6 |
+ <item android:drawable="@drawable/pop_btn_ok"/> |
|
| 7 |
+ |
|
| 8 |
+</selector> |
@@ -0,0 +1,86 @@ |
||
| 1 |
+<?xml version="1.0" encoding="utf-8"?> |
|
| 2 |
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
| 3 |
+ android:layout_width="match_parent" |
|
| 4 |
+ android:layout_height="match_parent"> |
|
| 5 |
+ |
|
| 6 |
+ <RelativeLayout |
|
| 7 |
+ android:id="@+id/click_to_dismiss" |
|
| 8 |
+ android:layout_width="match_parent" |
|
| 9 |
+ android:layout_height="match_parent" |
|
| 10 |
+ android:background="@color/popup_bg" |
|
| 11 |
+ android:paddingLeft="25dp" |
|
| 12 |
+ android:paddingRight="25dp"> |
|
| 13 |
+ |
|
| 14 |
+ <LinearLayout |
|
| 15 |
+ android:id="@+id/popup_anima" |
|
| 16 |
+ android:layout_width="280dp" |
|
| 17 |
+ android:layout_height="148dp" |
|
| 18 |
+ android:layout_centerInParent="true" |
|
| 19 |
+ android:background="@color/pop_bg_color" |
|
| 20 |
+ android:orientation="vertical"> |
|
| 21 |
+ |
|
| 22 |
+ |
|
| 23 |
+ <RelativeLayout |
|
| 24 |
+ android:layout_width="match_parent" |
|
| 25 |
+ android:layout_height="match_parent"> |
|
| 26 |
+ |
|
| 27 |
+ <TextView |
|
| 28 |
+ android:id="@+id/tv_pop_delete_title" |
|
| 29 |
+ android:layout_width="match_parent" |
|
| 30 |
+ android:layout_height="wrap_content" |
|
| 31 |
+ android:layout_marginTop="20dp" |
|
| 32 |
+ android:text="@string/exit_session_confirm" |
|
| 33 |
+ android:textColor="@color/black" |
|
| 34 |
+ android:layout_marginLeft="24dp" |
|
| 35 |
+ android:textSize="18sp" /> |
|
| 36 |
+ |
|
| 37 |
+ |
|
| 38 |
+ <TextView |
|
| 39 |
+ android:id="@+id/tv_pop_delete_hint" |
|
| 40 |
+ android:layout_width="match_parent" |
|
| 41 |
+ android:layout_height="wrap_content" |
|
| 42 |
+ android:layout_marginTop="56dp" |
|
| 43 |
+ android:layout_marginLeft="24dp" |
|
| 44 |
+ android:text="@string/exit_session_hint" |
|
| 45 |
+ android:textColor="@color/grey" |
|
| 46 |
+ android:textSize="16sp" /> |
|
| 47 |
+ |
|
| 48 |
+ |
|
| 49 |
+ |
|
| 50 |
+ <LinearLayout |
|
| 51 |
+ android:layout_width="match_parent" |
|
| 52 |
+ android:layout_height="wrap_content" |
|
| 53 |
+ android:layout_alignParentBottom="true" |
|
| 54 |
+ android:paddingBottom="14dp" |
|
| 55 |
+ android:gravity="center" |
|
| 56 |
+ android:orientation="horizontal"> |
|
| 57 |
+ |
|
| 58 |
+ |
|
| 59 |
+ <Button |
|
| 60 |
+ android:id="@+id/btn_cancel_delete" |
|
| 61 |
+ android:layout_width="120dp" |
|
| 62 |
+ android:layout_height="36dp" |
|
| 63 |
+ android:gravity="center" |
|
| 64 |
+ android:textColor="@color/dark_grey" |
|
| 65 |
+ android:background="@drawable/pop_btn_cancel_selector" |
|
| 66 |
+ android:text="@string/cancel" |
|
| 67 |
+ android:textSize="16sp" /> |
|
| 68 |
+ |
|
| 69 |
+ <Button |
|
| 70 |
+ android:id="@+id/btn_exit_session_confirm" |
|
| 71 |
+ android:layout_width="120dp" |
|
| 72 |
+ android:layout_height="36dp" |
|
| 73 |
+ android:gravity="center" |
|
| 74 |
+ android:textColor="@color/white" |
|
| 75 |
+ android:layout_marginLeft="8dp" |
|
| 76 |
+ android:background="@drawable/pop_btn_ok_selector" |
|
| 77 |
+ android:text="@string/ok" |
|
| 78 |
+ android:textSize="16sp" /> |
|
| 79 |
+ |
|
| 80 |
+ </LinearLayout> |
|
| 81 |
+ |
|
| 82 |
+ </RelativeLayout> |
|
| 83 |
+ </LinearLayout> |
|
| 84 |
+ </RelativeLayout> |
|
| 85 |
+ |
|
| 86 |
+</RelativeLayout> |
@@ -197,4 +197,10 @@ |
||
| 197 | 197 |
|
| 198 | 198 |
<string name="back_to_work">返回</string> |
| 199 | 199 |
|
| 200 |
+ <string name="exit_session_confirm">退出提示</string> |
|
| 201 |
+ |
|
| 202 |
+ <string name="exit_session_hint">确定要退出当前拍摄么</string> |
|
| 203 |
+ |
|
| 204 |
+ <string name="cancel">取消</string> |
|
| 205 |
+ |
|
| 200 | 206 |
</resources> |
@@ -16,7 +16,7 @@ org.gradle.parallel=true |
||
| 16 | 16 |
android.useDeprecatedNdk=true |
| 17 | 17 |
org.gradle.configureondemand=true |
| 18 | 18 |
|
| 19 |
-COMPILE_SDK_VERSION=24 |
|
| 19 |
+COMPILE_SDK_VERSION=23 |
|
| 20 | 20 |
BUILD_TOOLS_VERSION=25.0.2 |
| 21 | 21 |
MIN_SDK_VERSION=15 |
| 22 | 22 |
TARGET_SDK_VERSION=21 |