update:增加弹窗删除,优化动态权限提示
fix bug:
This commit is contained in:
2021-03-09 11:39:00 +08:00
parent a92df28f33
commit 7bdead5648
35 changed files with 723 additions and 36 deletions

View File

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

View File

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 247 B

View File

Before

Width:  |  Height:  |  Size: 799 B

After

Width:  |  Height:  |  Size: 799 B

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff" />
<stroke
android:width="0.8dp"
android:color="#ffffff" />
<!-- 圆角 -->
<corners android:radius="8dp" />
</shape>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 内部颜色 -->
<solid
android:color="@color/btn_cancel" />
<!-- 圆角的幅度 -->
<corners
android:topLeftRadius="@dimen/Btn_Radius"
android:topRightRadius="@dimen/Btn_Radius"
android:bottomLeftRadius="@dimen/Btn_Radius"
android:bottomRightRadius="@dimen/Btn_Radius" />
</shape>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 内部颜色 -->
<solid
android:color="@color/btn_cancel_pressed" />
<!-- 圆角的幅度 -->
<corners
android:topLeftRadius="@dimen/Btn_Radius"
android:topRightRadius="@dimen/Btn_Radius"
android:bottomLeftRadius="@dimen/Btn_Radius"
android:bottomRightRadius="@dimen/Btn_Radius" />
</shape>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 没有焦点时的背景颜色 -->
<item android:drawable="@drawable/bt_cancel_normnl" android:state_window_focused="false" />
<!-- 非触摸模式下获得焦点并单击时的背景颜色 -->
<item android:drawable="@drawable/bt_cancel_normnl" android:state_focused="true" android:state_pressed="true" />
<!-- 触摸模式下单击时的背景颜色 -->
<item android:drawable="@drawable/bt_cancel_pressed" android:state_focused="false" android:state_pressed="true" />
<!-- 选中时的背景颜色 -->
<item android:drawable="@drawable/bt_cancel_normnl" android:state_selected="true" />
<!-- 获得焦点时的背景 颜色 -->
<item android:drawable="@drawable/bt_cancel_normnl" android:state_focused="true" />
</selector>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 内部颜色 -->
<solid
android:color="@color/btn_sure" />
<!-- 圆角的幅度 -->
<corners
android:topLeftRadius="@dimen/Btn_Radius"
android:topRightRadius="@dimen/Btn_Radius"
android:bottomLeftRadius="@dimen/Btn_Radius"
android:bottomRightRadius="@dimen/Btn_Radius" />
</shape>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 内部颜色 -->
<solid
android:color="@color/btn_sure" />
<!-- 圆角的幅度 -->
<corners
android:topLeftRadius="@dimen/Btn_Radius"
android:topRightRadius="@dimen/Btn_Radius"
android:bottomLeftRadius="@dimen/Btn_Radius"
android:bottomRightRadius="@dimen/Btn_Radius" />
</shape>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 没有焦点时的背景颜色 -->
<item android:drawable="@drawable/bt_sure_normnl" android:state_window_focused="false" />
<!-- 非触摸模式下获得焦点并单击时的背景颜色 -->
<item android:drawable="@drawable/bt_sure_normnl" android:state_focused="true" android:state_pressed="true" />
<!-- 触摸模式下单击时的背景颜色 -->
<item android:drawable="@drawable/bt_sure_pressed" android:state_focused="false" android:state_pressed="true" />
<!-- 选中时的背景颜色 -->
<item android:drawable="@drawable/bt_sure_normnl" android:state_selected="true" />
<!-- 获得焦点时的背景 颜色 -->
<item android:drawable="@drawable/bt_sure_normnl" android:state_focused="true" />
</selector>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/bg_dialog"
android:minWidth="260dp"
android:orientation="vertical"
android:paddingTop="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/image"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginRight="16dp"
android:maxWidth="80dp"
android:maxHeight="80dp"
android:visibility="visible" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:textColor="@color/defaultColor"
android:textSize="20sp"
android:visibility="visible"
tools:text="消息提示" />
</LinearLayout>
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="48dp"
android:layout_marginRight="20dp"
android:gravity="center|left"
android:lineSpacingExtra="3dp"
android:lineSpacingMultiplier="1.2"
android:textColor="#999999"
android:textSize="17sp"
tools:text="提示消息提示消息提示消息提示消息提示消息提示消息提示消息提示消息" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="16dp"
android:background="#E4E4E4"
android:visibility="gone" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginBottom="32dp"
android:orientation="horizontal">
<Button
android:id="@+id/positive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_weight="1"
android:background="@drawable/bt_sure_selector"
android:gravity="center"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:text="Yes" />
<View
android:id="@+id/column_line"
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#E4E4E4"
android:visibility="gone" />
<Button
android:id="@+id/negtive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="48dp"
android:layout_weight="1"
android:background="@drawable/bt_cancel_selector"
android:gravity="center"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:text="No" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="400dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/bg_dialog"
android:minWidth="260dp"
android:orientation="vertical"
android:paddingTop="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/image"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginRight="16dp"
android:maxWidth="80dp"
android:maxHeight="80dp"
android:visibility="visible" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:textColor="@color/defaultColor"
android:textSize="20sp"
android:visibility="visible"
tools:text="消息提示" />
</LinearLayout>
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="48dp"
android:layout_marginRight="20dp"
android:gravity="center|left"
android:lineSpacingExtra="3dp"
android:lineSpacingMultiplier="1.2"
android:textColor="#999999"
android:textSize="17sp"
tools:text="提示消息提示消息提示消息提示消息提示消息提示消息提示消息提示消息" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="16dp"
android:background="#E4E4E4"
android:visibility="gone" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginBottom="32dp"
android:orientation="horizontal">
<Button
android:id="@+id/positive"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_weight="1"
android:background="@drawable/bt_sure_selector"
android:gravity="center"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:text="Yes" />
<View
android:id="@+id/column_line"
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#E4E4E4"
android:visibility="gone" />
<Button
android:id="@+id/negtive"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginEnd="48dp"
android:layout_weight="1"
android:background="@drawable/bt_cancel_selector"
android:gravity="center"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:text="No" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -6,4 +6,9 @@
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="defaultColor">#333333</color>
<color name="btn_sure">#4880ff</color>
<color name="btn_sure_pressed">#1E63FF</color>
<color name="btn_cancel">#d0d0d0</color>
<color name="btn_cancel_pressed">#9F9F9F</color>
</resources>

View File

@@ -2,6 +2,8 @@
<dimen name="PX0x">0dp</dimen>
<dimen name="PX1x">1dp</dimen>
<dimen name="PX5x">5dp</dimen>
<dimen name="Btn_Radius">40dp</dimen>
</resources>

View File

@@ -1,3 +1,3 @@
<resources>
<string name="app_name">快易播放器</string>
<string name="app_name">Ao播放器</string>
</resources>

View File

@@ -8,6 +8,17 @@
<item name="colorAccent">@color/defaultColor</item>
</style>
<style name="CustomDialog" parent="android:style/Theme.Dialog">
<!--背景颜色及和透明程度-->
<item name="android:windowBackground">@android:color/transparent</item>
<!--是否去除标题 -->
<item name="android:windowNoTitle">true</item>
<!--是否去除边框-->
<item name="android:windowFrame">@null</item>
<!--是否浮现在activity之上-->
<item name="android:windowIsFloating">true</item>
<!--是否模糊-->
<item name="android:backgroundDimEnabled">true</item>
</style>
</resources>