Name adjustments and minor fixes

+ Fix `top-margin` in the choose activity
+ Rename `ViewPager` files for Settings to contain the string 'Settings'
+ Rename `firstStartup` to `Tutorial`
+ Remove unused library imports in `SettingsActivity.kt`
This commit is contained in:
Finn M Glas 2020-05-28 18:42:58 +02:00
parent 09738cd648
commit b46c9d76d3
No known key found for this signature in database
GPG key ID: 25037A2E81AB459C
9 changed files with 10 additions and 22 deletions

View file

@ -24,7 +24,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".FirstStartupActivity"
<activity android:name=".TutorialActivity"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity">
</activity>

View file

@ -86,7 +86,7 @@ class MainActivity : AppCompatActivity(),
// First Startup
if (!sharedPref.getBoolean("startedBefore", false)){
startActivity(Intent(this, FirstStartupActivity::class.java))
startActivity(Intent(this, TutorialActivity::class.java))
tooltipTimer.cancel()
}
}

View file

@ -1,26 +1,15 @@
package com.finnmglas.launcher
import android.Manifest
import android.app.AlertDialog
import android.content.*
import android.content.pm.PackageManager
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.provider.MediaStore
import android.provider.Settings
import android.view.View
import android.view.WindowManager
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.viewpager.widget.ViewPager
import com.finnmglas.launcher.extern.*
import com.finnmglas.launcher.settings.SectionsPagerAdapter
import com.google.android.material.tabs.TabLayout
import kotlinx.android.synthetic.main.activity_settings.*
import kotlinx.android.synthetic.main.fragment_settings_apps.*
import kotlinx.android.synthetic.main.fragment_settings_theme.*
class SettingsActivity : AppCompatActivity() {

View file

@ -7,10 +7,10 @@ import android.util.TypedValue
import android.view.*
import androidx.appcompat.app.AppCompatActivity
import com.finnmglas.launcher.extern.*
import kotlinx.android.synthetic.main.activity_firststartup.*
import kotlinx.android.synthetic.main.activity_tutorial.*
class FirstStartupActivity : AppCompatActivity(){
class TutorialActivity : AppCompatActivity(){
/** Variables for this activity */
@ -37,7 +37,7 @@ class FirstStartupActivity : AppCompatActivity(){
else -> R.style.finnmglasTheme
}
)
setContentView(R.layout.activity_firststartup)
setContentView(R.layout.activity_tutorial)
if (getSavedTheme(this) == "custom") {
activity_firststartup_app_bar.setBackgroundColor(dominantColor)

View file

@ -13,7 +13,7 @@ import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.finnmglas.launcher.FirstStartupActivity
import com.finnmglas.launcher.TutorialActivity
import com.finnmglas.launcher.R
import com.finnmglas.launcher.extern.*
import kotlinx.android.synthetic.main.fragment_settings_meta.*
@ -76,7 +76,7 @@ class SettingsFragmentMeta : Fragment() {
}
fragment_settings_meta_view_tutorial_btn.setOnClickListener {
startActivity(Intent(this.context, FirstStartupActivity::class.java))
startActivity(Intent(this.context, TutorialActivity::class.java))
}
// prompting for settings-reset confirmation

View file

@ -5,7 +5,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import androidx.lifecycle.ViewModel
class PageViewModel : ViewModel() {
class SettingsPageViewModel : ViewModel() {
private val _index = MutableLiveData<Int>()
val text: LiveData<String> = Transformations.map(_index) {

View file

@ -61,10 +61,9 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/activity_choose_apps_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="86dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:scrollbars="vertical"

View file

@ -8,7 +8,7 @@
android:layout_height="match_parent"
android:background="?attr/colorPrimary"
android:onClick="clickAnywhere"
tools:context=".FirstStartupActivity">
tools:context=".TutorialActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/activity_firststartup_app_bar"