修改添加设备返回页面,通知刷新首页列表,优化首页列表边距
This commit is contained in:
@@ -60,7 +60,9 @@ class SetNameActivity : AppCompatActivity() {
|
||||
withContext(Dispatchers.Main) {
|
||||
if (result.code == 200) {
|
||||
Toast.makeText(this@SetNameActivity, "设备添加成功", Toast.LENGTH_SHORT).show()
|
||||
startActivity(Intent(this@SetNameActivity, LiveVideoActivity::class.java))
|
||||
startActivity(Intent(this@SetNameActivity, HomeActivity::class.java).apply {
|
||||
putExtra(HomeActivity.EXTRA_REFRESH, true)
|
||||
})
|
||||
finish()
|
||||
} else {
|
||||
Toast.makeText(this@SetNameActivity, result.msg ?: "添加失败", Toast.LENGTH_SHORT).show()
|
||||
|
||||
@@ -136,6 +136,9 @@
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user