From 2007a5fe4c1f623375d6adf59b5e0bd3ed744c61 Mon Sep 17 00:00:00 2001 From: X1nto Date: Tue, 5 May 2020 23:53:51 +0400 Subject: [PATCH 1/3] revert changes --- app/src/main/res/layout/fragment_home.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index fa9d0d18..76e89cf1 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -3,7 +3,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="12dp" android:fillViewport="true" android:scrollbars="none"> From 961b073568da8987000d3b957a80b5a47a32821c Mon Sep 17 00:00:00 2001 From: X1nto Date: Tue, 5 May 2020 23:56:43 +0400 Subject: [PATCH 2/3] code cleanup --- .../main/java/com/vanced/manager/ui/MainActivity.kt | 10 +++------- app/src/main/res/layout/activity_main.xml | 12 ------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/vanced/manager/ui/MainActivity.kt b/app/src/main/java/com/vanced/manager/ui/MainActivity.kt index 59ec49f7..2134f836 100644 --- a/app/src/main/java/com/vanced/manager/ui/MainActivity.kt +++ b/app/src/main/java/com/vanced/manager/ui/MainActivity.kt @@ -1,15 +1,13 @@ package com.vanced.manager.ui import android.content.SharedPreferences -import android.content.res.Configuration import android.os.Bundle import android.view.MenuItem +import androidx.appcompat.widget.Toolbar import androidx.navigation.NavDestination import androidx.navigation.findNavController import androidx.navigation.ui.AppBarConfiguration import androidx.navigation.ui.setupWithNavController -import androidx.preference.PreferenceManager -import com.google.android.material.appbar.MaterialToolbar import com.vanced.manager.R import com.vanced.manager.core.Main @@ -17,15 +15,13 @@ import com.vanced.manager.core.Main class MainActivity : Main() { private var isParent = true - private lateinit var currentTheme: String - private lateinit var pref: SharedPreferences override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) - val toolbar: MaterialToolbar = findViewById(R.id.home_toolbar) + val toolbar: Toolbar = findViewById(R.id.home_toolbar) setSupportActionBar(toolbar) val navHost = findNavController(R.id.bottom_nav_host) @@ -73,7 +69,7 @@ class MainActivity : Main() { } private fun setDisplayHomeAsUpEnabled(isNeeded: Boolean) { - val toolbar: MaterialToolbar = findViewById(R.id.home_toolbar) + val toolbar: Toolbar = findViewById(R.id.home_toolbar) when { isNeeded -> toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp) else -> toolbar.navigationIcon = null diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index fd7cdd3f..945e8b84 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -15,7 +15,6 @@ android:layout_below="@id/home_appbar" app:defaultNavHost="true" app:navGraph="@navigation/mobile_navigation"/> - - - \ No newline at end of file From 46423492182d22679db3484d43996ca41834f4b2 Mon Sep 17 00:00:00 2001 From: X1nto Date: Wed, 6 May 2020 00:11:23 +0400 Subject: [PATCH 3/3] removed unused import --- app/src/main/java/com/vanced/manager/ui/MainActivity.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/vanced/manager/ui/MainActivity.kt b/app/src/main/java/com/vanced/manager/ui/MainActivity.kt index 2134f836..dd315e51 100644 --- a/app/src/main/java/com/vanced/manager/ui/MainActivity.kt +++ b/app/src/main/java/com/vanced/manager/ui/MainActivity.kt @@ -1,6 +1,5 @@ package com.vanced.manager.ui -import android.content.SharedPreferences import android.os.Bundle import android.view.MenuItem import androidx.appcompat.widget.Toolbar