Commit b64abb47 authored by wanglei's avatar wanglei

init

parent 3494eae8
......@@ -14,10 +14,7 @@
android:theme="@style/Theme.LocationShareWhite"
tools:targetApi="34">
<activity
android:name=".ui.main.SettingActivity"
android:exported="false" />
<activity
android:name=".ui.howuse.HowViewOtherActivity"
android:name=".ui.set.FeedbackActivity"
android:exported="false" />
<meta-data
......@@ -40,6 +37,18 @@
android:launchMode="singleTop"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".ui.set.SettingActivity"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".ui.howuse.HowViewOtherActivity"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".ui.howuse.HowUseActivity"
android:exported="false"
......
......@@ -7,6 +7,7 @@ import com.base.locationsharewhite.databinding.ActivityMainBinding
import com.base.locationsharewhite.helper.BaseActivity
import com.base.locationsharewhite.ui.howuse.HowUseActivity
import com.base.locationsharewhite.ui.locationmap.LocationMapActivity
import com.base.locationsharewhite.ui.set.SettingActivity
import com.base.locationsharewhite.utils.BarUtils
class MainActivity : BaseActivity<ActivityMainBinding>() {
......@@ -36,5 +37,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
binding.flHowUse.setOnClickListener {
startActivity(Intent(this, HowUseActivity::class.java))
}
binding.flSettings.setOnClickListener {
startActivity(Intent(this, SettingActivity::class.java))
}
}
}
\ No newline at end of file
package com.base.locationsharewhite.ui.set
import com.base.locationsharewhite.R
import com.base.locationsharewhite.databinding.ActivityFeedbackBinding
import com.base.locationsharewhite.helper.BaseActivity
import com.base.locationsharewhite.utils.ToastUtils.toast
class FeedbackActivity : BaseActivity<ActivityFeedbackBinding>() {
override val binding: ActivityFeedbackBinding by lazy {
ActivityFeedbackBinding.inflate(layoutInflater)
}
override fun initView() {
}
override fun initListener() {
super.initListener()
binding.tvBtn.setOnClickListener {
toast(getString(R.string.thanks_for_your_feedback))
}
}
}
\ No newline at end of file
package com.base.locationsharewhite.ui.main
package com.base.locationsharewhite.ui.set
import android.content.Intent
import android.graphics.Color
import androidx.activity.addCallback
import androidx.core.view.updatePadding
import com.base.locationsharewhite.databinding.ActivitySettingBinding
import com.base.locationsharewhite.helper.BaseActivity
import com.base.locationsharewhite.utils.BarUtils
class SettingActivity : BaseActivity<ActivitySettingBinding>() {
......@@ -10,6 +15,22 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
}
override fun initView() {
BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.WHITE)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
}
override fun initListener() {
super.initListener()
onBackPressedDispatcher.addCallback {
finish()
}
binding.flFanhui.setOnClickListener {
onBackPressedDispatcher.onBackPressed()
}
binding.llFeedback.setOnClickListener {
startActivity(Intent(this, FeedbackActivity::class.java))
}
}
}
\ No newline at end of file
package com.base.locationsharewhite.utils
import android.content.Context
import android.widget.Toast
object ToastUtils {
fun Context.toast(content: String) {
Toast.makeText(this, content, Toast.LENGTH_SHORT).show()
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="10dp"/>
<solid android:color="@color/white"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="2dp"
android:color="#03B988" />
<corners android:radius="10dp"/>
</shape>
\ No newline at end of file
<?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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.set.FeedbackActivity">
<FrameLayout
android:id="@+id/fl_fanhui"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:padding="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/lv_fanhui"
tools:ignore="ContentDescription" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/feedback"
android:textColor="#001725"
android:textSize="22sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/fl_fanhui"
app:layout_constraintStart_toEndOf="@id/fl_fanhui"
app:layout_constraintTop_toTopOf="@id/fl_fanhui" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/fl_fanhui">
<EditText
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_weight="1"
android:background="@drawable/bg_stroke_03b988_10"
android:gravity="top|start"
android:hint="@string/enter_your_suggestion_please"
android:inputType="text"
android:paddingHorizontal="18dp"
android:paddingVertical="20dp"
android:textColor="@color/black"
android:textColorHint="#999999"
android:textSize="20sp"
tools:ignore="Autofill,TextFields" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="18dp"
android:layout_marginEnd="18dp"
android:text="@string/within_500_characters" />
<TextView
android:id="@+id/tv_btn"
android:layout_width="345dp"
android:layout_height="50dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="40dp"
android:layout_marginBottom="36dp"
android:background="@drawable/bg_03b988_10"
android:gravity="center"
android:text="@string/feedback"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -192,6 +192,7 @@
</FrameLayout>
<FrameLayout
android:id="@+id/fl_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
......
......@@ -5,7 +5,7 @@
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.main.SettingActivity">
tools:context=".ui.set.SettingActivity">
<FrameLayout
android:id="@+id/fl_fanhui"
......@@ -35,6 +35,7 @@
app:layout_constraintTop_toTopOf="@id/fl_fanhui" />
<FrameLayout
android:id="@+id/fl_rename"
android:layout_width="match_parent"
android:layout_height="88dp"
android:layout_marginHorizontal="16dp"
......@@ -48,7 +49,224 @@
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
android:text="@string/hello_ndefault"
android:textColor="@color/white" />
android:textColor="@color/white"
android:textSize="28sp" />
<LinearLayout
android:layout_width="106dp"
android:layout_height="38dp"
android:layout_gravity="center_vertical|end"
android:layout_marginEnd="16dp"
android:background="@drawable/bg_ffffff_10"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="8dp"
android:src="@mipmap/bianji"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="8dp"
android:text="@string/rename"
android:textColor="#08C95C"
android:textSize="17sp" />
</LinearLayout>
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/fl_rename">
<LinearLayout
android:id="@+id/ll_language"
android:layout_width="match_parent"
android:layout_height="61dp"
android:layout_marginTop="18dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:src="@mipmap/language"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="10dp"
android:layout_weight="1"
android:text="@string/language"
android:textColor="#031F2D"
android:textSize="17sp"
tools:ignore="HardcodedText" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:src="@mipmap/set_jiantou"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_rate_use"
android:layout_width="match_parent"
android:layout_height="61dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:src="@mipmap/rateus"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="10dp"
android:layout_weight="1"
android:text="@string/rate_us"
android:textColor="#031F2D"
android:textSize="17sp"
tools:ignore="HardcodedText" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:src="@mipmap/set_jiantou"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_feedback"
android:layout_width="match_parent"
android:layout_height="61dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:src="@mipmap/feedback"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="10dp"
android:layout_weight="1"
android:text="@string/feedback"
android:textColor="#031F2D"
android:textSize="17sp"
tools:ignore="HardcodedText" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:src="@mipmap/set_jiantou"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_about_us"
android:layout_width="match_parent"
android:layout_height="61dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:src="@mipmap/aboutus"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="10dp"
android:layout_weight="1"
android:text="@string/about_us"
android:textColor="#031F2D"
android:textSize="17sp"
tools:ignore="HardcodedText" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:src="@mipmap/set_jiantou"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_share_app"
android:layout_width="match_parent"
android:layout_height="61dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:src="@mipmap/share"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="10dp"
android:layout_weight="1"
android:text="@string/share_app"
android:textColor="#031F2D"
android:textSize="17sp"
tools:ignore="HardcodedText" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:src="@mipmap/set_jiantou"
tools:ignore="ContentDescription" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -33,4 +33,13 @@
<string name="how_view_other_step_1">1. Copy The Location Code Below And Send It To A Friend.\n</string>
<string name="how_view_other_step_2">2. When Your Friend Pastes The LLocation\nCode In The App And Clicks On Share, You Can Obtain Their Location\n</string>
<string name="hello_ndefault">Hello,\nDefault!</string>
<string name="rename">Rename</string>
<string name="language">Language</string>
<string name="rate_us">Rate Us</string>
<string name="feedback">Feedback</string>
<string name="about_us">About Us</string>
<string name="share_app">Share App</string>
<string name="enter_your_suggestion_please">Enter your suggestion please</string>
<string name="within_500_characters">Within 500 characters</string>
<string name="thanks_for_your_feedback">Thanks for your feedback</string>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment