remove toolbar icon, change text color styles, new logo, version bump
23
app/app.iml
|
@ -12,8 +12,8 @@ android {
|
|||
applicationId 'com.eleith.hashtagit'
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
versionCode 2
|
||||
versionName "2.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 47 KiB |
|
@ -12,9 +12,9 @@ class HashTagItActivity : AppCompatActivity() {
|
|||
|
||||
fun showToolbar(toggle: Boolean) {
|
||||
if (toggle) {
|
||||
supportActionBar?.hide()
|
||||
} else {
|
||||
supportActionBar?.show()
|
||||
} else {
|
||||
supportActionBar?.hide()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,28 +23,4 @@ class HashTagItActivity : AppCompatActivity() {
|
|||
setContentView(R.layout.activity_hash_tag_it)
|
||||
setSupportActionBar(toolbar)
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||
super.onCreateOptionsMenu(menu)
|
||||
menuInflater.inflate(R.menu.menu_main, menu)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem?): Boolean {
|
||||
return when (item?.itemId) {
|
||||
R.id.icon_inverse -> {
|
||||
|
||||
// actually, probably dont need view model
|
||||
// and can just change theme here on the clicks
|
||||
val vm = ViewModelProviders.of(this)[BackgroundViewModel::class.java]
|
||||
vm.backgroundColor.value?.apply {
|
||||
!this
|
||||
}
|
||||
true
|
||||
}
|
||||
else -> {
|
||||
super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@ class SplashFragment: Fragment() {
|
|||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
|
||||
(activity as? HashTagItActivity)?.showToolbar(true)
|
||||
(activity as? HashTagItActivity)?.showToolbar(false)
|
||||
|
||||
uiScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
|
@ -30,11 +29,14 @@ class SplashFragment: Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
(activity as? HashTagItActivity)?.showToolbar(true)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
|
||||
(activity as? HashTagItActivity)?.showToolbar(false)
|
||||
|
||||
// make sure if user leaves screen to early before delay, we have killed the couroutine
|
||||
job.cancel()
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import android.app.Activity
|
|||
import android.content.pm.ActivityInfo
|
||||
import android.os.Bundle
|
||||
import android.util.DisplayMetrics
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
@ -24,13 +23,25 @@ class SubmissionFragment : Fragment() {
|
|||
return inflater.inflate(R.layout.fragment_submission, container, false)
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
(activity as? HashTagItActivity)?.showToolbar(false)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
(activity as? HashTagItActivity)?.showToolbar(true)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
|
||||
if (activity?.requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE) {
|
||||
arguments?.apply {
|
||||
textView.text = SubmissionFragmentArgs.fromBundle(this).writtenText
|
||||
val hash = "#"
|
||||
val submission = SubmissionFragmentArgs.fromBundle(this).writtenText
|
||||
textView.text = String.format("%s%s", hash, submission)
|
||||
textView.measure(0, 0)
|
||||
|
||||
putIntoLeanBackMode()
|
||||
|
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 30 KiB |
|
@ -1,6 +0,0 @@
|
|||
<vector android:height="48dp" android:viewportHeight="48"
|
||||
android:viewportWidth="48" android:width="48dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillAlpha=".36" android:fillColor="#FF000000" android:pathData="M0,20h24v4H0z"/>
|
||||
<path android:fillColor="#FF000000" android:pathData="M11,3L5.5,17h2.25l1.12,-3h6.25l1.12,3h2.25L13,3h-2zM9.62,12L12,5.67 14.38,12L9.62,12z"/>
|
||||
</vector>
|
|
@ -2,6 +2,7 @@
|
|||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/activityContainer"
|
||||
|
@ -12,8 +13,8 @@
|
|||
android:layout_height="?attr/actionBarSize"
|
||||
android:elevation="4dp"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"
|
||||
android:layout_width="match_parent"/>
|
||||
|
||||
<fragment
|
||||
|
@ -23,6 +24,7 @@
|
|||
android:id="@+id/my_nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
app:navGraph="@navigation/mobile_navigation"
|
||||
tools:layout="@layout/fragment_splash"
|
||||
app:defaultNavHost="true"
|
||||
/>
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
style="@style/AppButton"
|
||||
android:text="Hash it"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item android:id="@+id/icon_inverse"
|
||||
android:icon="@drawable/icon_text"
|
||||
android:title="inverse"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
</menu>
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 19 KiB |
|
@ -8,4 +8,8 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppButton" parent="Widget.MaterialComponents.Button">
|
||||
<item name="android:textColor">#000</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|