remove useless content

This commit is contained in:
inxtes
2021-12-29 16:51:04 +08:00
parent 5a17216fff
commit fce1c93d75
3 changed files with 4 additions and 27 deletions
@@ -108,12 +108,6 @@ class MainActivity : AppCompatActivity() {
val nav = findViewById<NavigationView>(R.id.nav)
val headerView = nav.getHeaderView(0)
val name = headerView.findViewById<TextView>(R.id.name)
name.text = username
name.setOnClickListener {
alterEditDialog()
}
nav.setCheckedItem(R.id.photo)
nav.setNavigationItemSelectedListener {
@@ -154,11 +148,6 @@ class MainActivity : AppCompatActivity() {
Log.e("edit",et.text.toString())
val sharedPreferences = getSharedPreferences("username", 0).edit()
sharedPreferences.putString("username",et.text.toString()).apply()
username = et.text.toString()
val nav = findViewById<NavigationView>(R.id.nav)
val headerView = nav.getHeaderView(0)
val name = headerView.findViewById<TextView>(R.id.name)
name.text = username
}.create().show()
}
private fun hiddenSearchBar(){
@@ -206,6 +195,7 @@ class MainActivity : AppCompatActivity() {
}
private fun loadPost(context: Context, source: String?, tags: String?,page:String){
nowPosition = postList.size-3
+1 -15
View File
@@ -2,21 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/nav_header"
android:layout_width="match_parent"
android:layout_height="180dp">
android:layout_height="0dp">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:text="Null"
android:layout_marginEnd="30dp"
android:textSize="32sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="#000"/>
</FrameLayout>