version:5.0

fix:
update:增加app快捷方式
This commit is contained in:
2024-04-12 10:33:20 +08:00
parent 5e9b850d6b
commit 6fcb68d76e
20 changed files with 1164 additions and 105 deletions

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/dp_280"
android:layout_height="@dimen/dp_200"
android:background="@drawable/bg_dialog"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:maxLines="1"
android:textSize="@dimen/sp_11"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="appName" />
<ImageView
android:id="@+id/iv_icon"
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout16"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_app_name" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_32"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/tv_add"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_24"
android:layout_weight="1"
android:background="@drawable/default_button_bg"
android:gravity="center"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="添加" />
<TextView
android:id="@+id/tv_cancel"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_24"
android:layout_marginStart="@dimen/dp_48"
android:layout_weight="1"
android:background="@drawable/default_button_cancel_bg"
android:gravity="center"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/tv_add"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
android:text="取消" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/dp_300"
android:layout_height="@dimen/dp_200"
android:layout_centerInParent="true"
android:background="@drawable/bg_dialog"
android:minWidth="@dimen/dp_240"
android:orientation="vertical"
android:paddingTop="@dimen/dp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<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/black"
android:textSize="@dimen/sp_18"
android:textStyle="bold"
android:visibility="visible"
tools:text="消息提示" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@mipmap/ic_launcher" />
<ImageView
android:id="@+id/iv_app_icon"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_26"
android:layout_marginTop="@dimen/dp_26"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="@+id/iv_icon"
app:layout_constraintTop_toTopOf="parent"
tools:src="@mipmap/ic_launcher" />
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_20"
android:gravity="center"
android:lineSpacingExtra="@dimen/dp_3"
android:maxLines="1"
android:textColor="#999999"
android:textSize="@dimen/sp_14"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_icon"
tools:text="app" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_56"
android:layout_marginEnd="@dimen/dp_56"
android:layout_marginBottom="@dimen/dp_20"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/positive"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_28"
android:layout_weight="1"
android:background="@drawable/default_button_bg"
android:gravity="center"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="@dimen/sp_14"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="确定" />
<TextView
android:id="@+id/negtive"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_28"
android:layout_weight="1"
android:background="@drawable/default_button_cancel_bg"
android:gravity="center"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="@dimen/sp_14"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="取消" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -17,37 +17,37 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<!-- <ImageView-->
<!-- android:layout_width="2px"-->
<!-- android:layout_height="0dp"-->
<!-- android:background="@color/line_color"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <ImageView-->
<!-- android:layout_width="2px"-->
<!-- android:layout_height="0dp"-->
<!-- android:background="@color/line_color"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <ImageView-->
<!-- android:layout_width="2px"-->
<!-- android:layout_height="0dp"-->
<!-- android:background="@color/line_color"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <ImageView-->
<!-- android:layout_width="2px"-->
<!-- android:layout_height="0dp"-->
<!-- android:background="@color/line_color"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <ImageView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="2px"-->
<!-- android:background="@color/line_color"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <ImageView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="2px"-->
<!-- android:background="@color/line_color"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <ImageView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="2px"-->
<!-- android:background="@color/line_color"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent" />-->
<!-- <ImageView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="2px"-->
<!-- android:background="@color/line_color"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent" />-->
<ImageView
android:id="@+id/iv"
@@ -60,6 +60,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_app"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_marginStart="@dimen/dp_28"
android:layout_marginTop="@dimen/dp_28"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:visibility="gone"
app:layout_constraintStart_toStartOf="@+id/iv"
app:layout_constraintTop_toTopOf="@+id/iv" />
<TextView
android:id="@+id/bg"
android:layout_width="@dimen/dp_20"
@@ -68,10 +80,10 @@
android:layout_marginBottom="@dimen/dp_36"
android:background="@drawable/badge_bg"
android:gravity="center"
android:maxLines="1"
android:minWidth="@dimen/dp_20"
android:minHeight="@dimen/dp_20"
android:text="1"
android:maxLines="1"
android:textColor="@color/white"
android:textSize="@dimen/sp_10"
android:visibility="gone"

View File

@@ -7,4 +7,8 @@
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="permdesc_install_shortcut" msgid="923466509822011139">"允许应用自行添加快捷方式。"</string>
<string name="permlab_install_shortcut" msgid="5632423390354674437">"安装快捷方式"</string>
<string name="action_add_to_workspace" msgid="8902165848117513641">"添加到主屏幕"</string>
</resources>

View File

@@ -30,7 +30,7 @@
<!--是否浮现在activity之上-->
<item name="android:windowIsFloating">false</item>
<!--是否半透明-->
<!-- <item name="android:windowIsTranslucent">true</item>-->
<item name="android:windowIsTranslucent">true</item>
<!--设置窗口内容不覆盖-->
<item name="android:windowContentOverlay">@null</item>
<!--设置动画在这里使用让它继承系统的Animation.Dialog-->