切换家庭,消息列表
This commit is contained in:
@@ -19,6 +19,9 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.DefenseApplication">
|
android:theme="@style/Theme.DefenseApplication">
|
||||||
|
<activity
|
||||||
|
android:name=".home.AddDeviceActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".personal.PersonalProfileActivity"
|
android:name=".personal.PersonalProfileActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.example.defenseapplication.home
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.example.defenseapplication.R
|
||||||
|
|
||||||
|
class AddDeviceActivity : AppCompatActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
enableEdgeToEdge()
|
||||||
|
setContentView(R.layout.add_device_activity)
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||||
|
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||||
|
insets
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,7 +23,7 @@ class PersonalFragment : Fragment() {
|
|||||||
): View {
|
): View {
|
||||||
_binding = PersonalFragmentBinding.inflate(inflater, container, false)
|
_binding = PersonalFragmentBinding.inflate(inflater, container, false)
|
||||||
Glide.with(this)
|
Glide.with(this)
|
||||||
.load(R.mipmap.ic_launcher_round)
|
.load(R.drawable.img)
|
||||||
.circleCrop()
|
.circleCrop()
|
||||||
.into(binding.ivAvatar)
|
.into(binding.ivAvatar)
|
||||||
binding.headerLayout.setOnClickListener {
|
binding.headerLayout.setOnClickListener {
|
||||||
|
|||||||
@@ -30,9 +30,8 @@ class PersonalProfileActivity : AppCompatActivity() {
|
|||||||
private fun initView() {
|
private fun initView() {
|
||||||
binding.ivBack.setOnClickListener { finish() }
|
binding.ivBack.setOnClickListener { finish() }
|
||||||
|
|
||||||
// 默认展示数据(后续可接你的用户信息接口/数据库)
|
|
||||||
Glide.with(this)
|
Glide.with(this)
|
||||||
.load(R.mipmap.ic_launcher_round)
|
.load(R.drawable.img)
|
||||||
.circleCrop()
|
.circleCrop()
|
||||||
.into(binding.ivAvatar)
|
.into(binding.ivAvatar)
|
||||||
|
|
||||||
|
|||||||
BIN
app/src/main/res/drawable/add_d.png
Normal file
BIN
app/src/main/res/drawable/add_d.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
app/src/main/res/drawable/img.png
Normal file
BIN
app/src/main/res/drawable/img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
10
app/src/main/res/layout/add_device_activity.xml
Normal file
10
app/src/main/res/layout/add_device_activity.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?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=".home.AddDeviceActivity">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -65,7 +65,6 @@
|
|||||||
android:id="@+id/ivDetail"
|
android:id="@+id/ivDetail"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:background="@drawable/bg_detail_border"
|
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:src="@drawable/right_back"
|
android:src="@drawable/right_back"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|||||||
Reference in New Issue
Block a user