Commit ace077f1 authored by mengcuiguang2's avatar mengcuiguang2

设置界面添加用户id

parent eb1a045a
......@@ -100,8 +100,22 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
if (userManager.userIsLogin()) {
btn_switch.visibility = View.VISIBLE
item_invitedCode.visibility = View.VISIBLE
item_invitedCode_line.visibility = View.VISIBLE
item_invitedCode.findViewById<TextView>(R.id.tv_title).text = "用户ID"
val invitedCode = resources.getDrawable(R.mipmap.icon_settings_invite)
invitedCode.setBounds(0, 0, 56, 56)
item_invitedCode.findViewById<TextView>(R.id.tv_title)
.setCompoundDrawables(invitedCode, null, null, null)
item_invitedCode.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE
item_invitedCode.findViewById<ImageView>(R.id.iv_right).visibility = View.GONE
item_invitedCode.findViewById<TextView>(R.id.tv_right).text =
"街景-${UserManager.INSTANCE.getCodeID()}"
} else {
btn_switch.visibility = View.GONE
item_invitedCode.visibility = View.GONE
item_invitedCode_line.visibility = View.GONE
}
}
......
......@@ -23,7 +23,17 @@
style="@style/view_line_E6E6E6"
android:layout_alignParentBottom="true"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp" />
<include
android:id="@+id/item_invitedCode"
layout="@layout/item_settings" />
<View
android:id="@+id/item_invitedCode_line"
style="@style/view_line_E6E6E6"
android:layout_alignParentBottom="true"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp" />
<include
......
......@@ -28,6 +28,7 @@
android:id="@+id/tv_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:visibility="gone" />
......
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