ui优化
This commit is contained in:
parent
6e62e4063b
commit
b58024ca73
@ -12,13 +12,14 @@ android {
|
|||||||
compileSdk = 34
|
compileSdk = 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.drawing.trace.sketch.draw"
|
//com.drawing.trace.sketch.draw
|
||||||
|
applicationId = "com.drawing.trace.sketch.draw.test"
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "1.0.0"
|
versionName = "1.0.0"
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
setProperty("archivesBaseName", "DrawSketch_V" + versionName + "(${versionCode})_$timestamp")
|
setProperty("archivesBaseName", "AR Draw_V" + versionName + "(${versionCode})_$timestamp")
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@ -13,7 +13,8 @@
|
|||||||
android:maxSdkVersion="32" />
|
android:maxSdkVersion="32" />
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
android:maxSdkVersion="32" />
|
android:maxSdkVersion="32"
|
||||||
|
tools:ignore="ScopedStorage" />
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import com.lh.painting.dao.TaskDao;
|
|||||||
import com.lh.painting.entity.Favorite;
|
import com.lh.painting.entity.Favorite;
|
||||||
|
|
||||||
|
|
||||||
@Database(entities = {Favorite.class}, version = 1)
|
@Database(entities = {Favorite.class}, version = 1,exportSchema = false)
|
||||||
public abstract class AppDatabase extends RoomDatabase {
|
public abstract class AppDatabase extends RoomDatabase {
|
||||||
public abstract TaskDao taskDao();
|
public abstract TaskDao taskDao();
|
||||||
private static volatile AppDatabase INSTANCE;
|
private static volatile AppDatabase INSTANCE;
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
android:pathData="M15.5,18L9.5,12L15.5,6"
|
android:pathData="M15.5,18L9.5,12L15.5,6"
|
||||||
android:strokeLineJoin="round"
|
android:strokeLineJoin="round"
|
||||||
android:strokeWidth="2"
|
android:strokeWidth="2"
|
||||||
android:fillColor="#00000000"
|
android:fillColor="@color/black"
|
||||||
android:strokeColor="#80000000"
|
android:strokeColor="#80000000"
|
||||||
android:strokeLineCap="round"/>
|
android:strokeLineCap="round"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
5
app/src/main/res/drawable/bg_circle.xml
Normal file
5
app/src/main/res/drawable/bg_circle.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="oval">
|
||||||
|
<solid android:color="@color/camera"/>
|
||||||
|
</shape>
|
||||||
13
app/src/main/res/drawable/left_back.xml
Normal file
13
app/src/main/res/drawable/left_back.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M15.5,18L9.5,12L15.5,6"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#000000"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
</vector>
|
||||||
5
app/src/main/res/drawable/main_bg_16.xml
Normal file
5
app/src/main/res/drawable/main_bg_16.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="16dp" />
|
||||||
|
<solid android:color="@color/camera"/>
|
||||||
|
</shape>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="40dp"
|
android:layout_marginBottom="50dp"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:background="@drawable/rounded_corners_camera"
|
android:background="@drawable/rounded_corners_camera"
|
||||||
|
|||||||
@ -11,50 +11,50 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="40dp"
|
||||||
>
|
android:layout_marginEnd="20dp">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:background="@drawable/rounded_corners_camera"
|
|
||||||
android:id="@+id/imageview_back"
|
android:id="@+id/imageview_back"
|
||||||
android:layout_width="44dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="44dp">
|
android:layout_height="44dp"
|
||||||
|
android:background="@drawable/bg_circle">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="23dp"
|
android:layout_width="23dp"
|
||||||
android:layout_height="23dp"
|
android:layout_height="23dp"
|
||||||
android:src="@drawable/back_icon" />
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/left_back" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/details_text"
|
android:id="@+id/details_text"
|
||||||
android:gravity="center"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/tab_draw"
|
android:text="@string/tab_draw"
|
||||||
android:textColor="@color/text_color"
|
android:textColor="@color/text_color"
|
||||||
android:textStyle="bold"
|
android:textSize="24sp"
|
||||||
android:textSize="24sp">
|
android:textStyle="bold"/>
|
||||||
</TextView>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:id="@+id/tab_layout"
|
android:id="@+id/tab_layout"
|
||||||
android:background="@color/background"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="51dp"
|
android:layout_height="51dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:background="@color/background"
|
||||||
app:tabIndicatorHeight="0dp"
|
app:tabIndicatorHeight="0dp"
|
||||||
app:tabMode="scrollable"
|
app:tabBackground="@null"
|
||||||
>
|
app:tabRippleColor="@null"
|
||||||
</com.google.android.material.tabs.TabLayout>
|
app:tabMode="scrollable"/>
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:id="@+id/view_pager2"
|
android:id="@+id/view_pager2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
</androidx.viewpager2.widget.ViewPager2>
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginEnd="20dp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -12,13 +12,13 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="52dp"
|
||||||
android:layout_weight="370">
|
android:layout_weight="370">
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/setting"
|
android:id="@+id/setting"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:layout_marginTop="33dp"
|
android:background="@drawable/main_bg_16"
|
||||||
android:background="@drawable/rounded_corners_camera"
|
|
||||||
android:layout_width="44dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
tools:ignore="RtlHardcoded,UselessParent">
|
tools:ignore="RtlHardcoded,UselessParent">
|
||||||
@ -32,8 +32,7 @@
|
|||||||
android:id="@+id/collection"
|
android:id="@+id/collection"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginEnd="32dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginTop="33dp"
|
android:background="@drawable/main_bg_16"
|
||||||
android:background="@drawable/rounded_corners_camera"
|
|
||||||
android:layout_width="44dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
tools:ignore="RtlHardcoded,UselessParent">
|
tools:ignore="RtlHardcoded,UselessParent">
|
||||||
|
|||||||
@ -1,44 +1,38 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/card"
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="160dp"
|
android:layout_width="160dp"
|
||||||
android:layout_height="146dp"
|
android:layout_height="146dp"
|
||||||
android:id="@+id/card"
|
app:cardCornerRadius="16dp"
|
||||||
app:cardCornerRadius="16dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imPreview"
|
android:id="@+id/imPreview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/ic_launcher"
|
||||||
|
android:layout_below="@id/collect"
|
||||||
|
android:layout_marginTop="-10dp"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
android:layout_marginStart="130dp">
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/collect"
|
android:id="@+id/collect"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="44dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="44dp"
|
||||||
android:background="@drawable/collect"
|
android:layout_alignParentEnd="true"
|
||||||
>
|
android:padding="10dp"
|
||||||
</ImageView>
|
android:src="@drawable/collect" />
|
||||||
</FrameLayout>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Draw Sketch</string>
|
<string name="app_name">AR Draw</string>
|
||||||
<string name="tab_draw">Trace & Draw</string>
|
<string name="tab_draw">Trace & Draw</string>
|
||||||
<string name="favorite">My favorites</string>
|
<string name="favorite">My favorites</string>
|
||||||
<string name="import_photo">Import Photos</string>
|
<string name="import_photo">Import Photos</string>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[versions]
|
[versions]
|
||||||
agp = "8.5.0"
|
agp = "8.1.3"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.2.1"
|
junitVersion = "1.2.1"
|
||||||
espressoCore = "3.6.1"
|
espressoCore = "3.6.1"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user