Parcourir la source

Merge branch 'develop'

sduduzog il y a 7 ans
Parent
commit
9e584c15f9

+ 11 - 27
README.md

@@ -2,28 +2,10 @@
 
 > _All you need is less._
 
-<style>
-#app-logo{
-  height: 250px;
-  width: 100%;
-  clear: both;
-  object-fit: contain;
-}
-
-#g-badge{
-  height: 50px;
-  float: left
-}
 </style>
 <img id="app-logo" src="docs/assets/ic_launcher-web.png">
 
-<a href="https://play.google.com/apps//details?id=com.sduduzog.slimlauncher">
-<img id="g-badge" src="docs/assets/google-play-badge.png">
-</a>
-
-### Now available for [download](https://play.google.com/apps//details?id=com.sduduzog.slimlauncher) on Google Play
-
-...Or get the latest unreleased [beta version](https://play.google.com/apps/testing/com.sduduzog.slimlauncher).
+## Now available on Google Play[![Google Play badge](docs/assets/google-play-badge.png)](https://play.google.com/store/apps/details?id=com.sduduzog.slimlauncher)
 
 ## Background
 
@@ -36,14 +18,16 @@ This project was inspired by LessPhone [LessPhone](https://play.google.com/store
 - [x] Release on Google Play _(release the kraken!)_
 - [x] Variety of themes
 - [x] Clean up README _...continuous_.
-- [] Journal (text and audio)
-- [] Gesture controls for home screen modes
-- [] Tasks (like journal but better)
-- [] Figure out whether to fully adopt Material Design or continue mixing with flat principles. Open an issue...if there is one.
-- [] Tests and README badges **!important;**
-- [] Landing page for the app.
-- [] A tutorial series in how to build an android launcher
+- [ ] Journal (text and audio)
+- [ ] Gesture controls for home screen modes
+- [ ] Tasks (like journal but better)
+- [ ] Figure out whether to fully adopt Material Design or continue mixing with flat principles. Open an issue...if there is one.
+- [ ] Tests and README badges **!important;**
+- [ ] Landing page for the app.
+- [ ] A tutorial series in how to build an android launcher
+- [ ] App usage analytics. Offline of course
 
 ## Contribute
 
-- YES! PRs are more than welcome.
+- PRs are more than welcome.
+- [Sign up as a tester](https://play.google.com/apps/testing/com.sduduzog.slimlauncher) and get releases before everyone else.

+ 8 - 3
app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt

@@ -12,7 +12,8 @@ import androidx.navigation.Navigation.findNavController
 import com.sduduzog.slimlauncher.ui.main.MainViewModel
 
 
-class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceChangeListener, NavController.OnNavigatedListener {
+class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceChangeListener, NavController.OnDestinationChangedListener {
+
 
     private lateinit var settings: SharedPreferences
     private val label = "main_fragment"
@@ -47,7 +48,8 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
         settings = getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
         settings.registerOnSharedPreferenceChangeListener(this)
         navigator = findNavController(this, R.id.nav_host_fragment)
-        navigator.addOnNavigatedListener(this)
+//        navigator.addOnNavigatedListener(this) : removed. a breaking change
+        navigator.addOnDestinationChangedListener(this)
         viewModel = ViewModelProviders.of(this).get(MainViewModel::class.java)
     }
 
@@ -77,7 +79,10 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
         else onBackPressedListener?.onBackPress()
     }
 
-    override fun onNavigated(controller: NavController, destination: NavDestination) {
+    /**
+     * Make the activity aware of the current destination in our NavController.
+     */
+    override fun onDestinationChanged(controller: NavController, destination: NavDestination, arguments: Bundle?) {
         currentLabel = destination.label.toString()
     }
 

+ 13 - 0
app/src/main/res/values-v23/styles.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
+        <item name="colorAccent">@color/colorAccent</item>
+        <item name="android:colorForeground">@android:color/black</item>
+        <!--<item name="android:statusBarColor">@color/colorWhiteDark</item>-->
+        <item name="colorPrimary">@color/colorWhite</item>
+        <item name="colorPrimaryDark">@color/colorWhiteDark</item>
+        <item name="android:colorBackground">@color/colorWhite</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimaryDark</item>
+        <item name="android:windowLightStatusBar">true</item>
+    </style>
+</resources>

BIN
docs/assets/google-play-badge.png


BIN
docs/assets/ic_launcher-web.png