diff --git a/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt b/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt index be9b4a8..bdc717b 100644 --- a/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt +++ b/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt @@ -337,10 +337,6 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra override fun onOptionsItemSelected(item: MenuItem): Boolean { return when (item.itemId) { - R.id.detail_menu_test -> { - onTestClick() - true - } R.id.detail_menu_notifications_enabled -> { onMutedUntilClick(enable = false) true @@ -361,22 +357,6 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra onInstantEnableClick(enable = false) true } - R.id.detail_menu_copy_url -> { - onCopyUrlClick() - true - } - R.id.detail_menu_clear -> { - onClearClick() - true - } - R.id.detail_menu_settings -> { - onSettingsClick() - true - } - R.id.detail_menu_unsubscribe -> { - onDeleteClick() - true - } else -> super.onOptionsItemSelected(item) } } diff --git a/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt b/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt index bcab10a..61b1cae 100644 --- a/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt +++ b/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt @@ -62,7 +62,6 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc private lateinit var mainList: RecyclerView private lateinit var mainListContainer: SwipeRefreshLayout private lateinit var adapter: MainAdapter - private lateinit var fab: FloatingActionButton // Other stuff private var actionMode: ActionMode? = null @@ -85,12 +84,6 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc // Action bar title = getString(R.string.main_action_bar_title) - // Floating action button ("+") - fab = findViewById(R.id.fab) - fab.setOnClickListener { - onSubscribeButtonClick() - } - // Swipe to refresh mainListContainer = findViewById(R.id.main_subscriptions_list_container) mainListContainer.setOnRefreshListener { refreshAllSubscriptions() } @@ -402,11 +395,6 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc onNotificationSettingsClick(enable = true) true } - R.id.main_menu_settings -> { - startActivity(Intent(this, SettingsActivity::class.java)) - true - } - else -> super.onOptionsItemSelected(item) } } @@ -631,18 +619,6 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc actionMode = startActionMode(this) adapter.toggleSelection(subscription.id) - // Fade out FAB - fab.alpha = 1f - fab - .animate() - .alpha(0f) - .setDuration(ANIMATION_DURATION) - .setListener(object : AnimatorListenerAdapter() { - override fun onAnimationEnd(animation: Animator) { - fab.visibility = View.GONE - } - }) - // Fade status bar color val fromColor = ContextCompat.getColor(this, Colors.statusBarNormal(this)) val toColor = ContextCompat.getColor(this, Colors.statusBarActionMode(this)) @@ -659,19 +635,6 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc adapter.selected.clear() redrawList() - // Fade in FAB - fab.alpha = 0f - fab.visibility = View.VISIBLE - fab - .animate() - .alpha(1f) - .setDuration(ANIMATION_DURATION) - .setListener(object : AnimatorListenerAdapter() { - override fun onAnimationEnd(animation: Animator) { - fab.visibility = View.VISIBLE // Required to replace the old listener - } - }) - // Fade status bar color val fromColor = ContextCompat.getColor(this, Colors.statusBarActionMode(this)) val toColor = ContextCompat.getColor(this, Colors.statusBarNormal(this)) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 0bb4bd6..8abd5bd 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -174,7 +174,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintBottom_toTopOf="@+id/fab" app:layout_constraintStart_toStartOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" android:id="@+id/main_no_subscriptions" android:visibility="gone"> - - diff --git a/app/src/main/res/menu/menu_detail_action_bar.xml b/app/src/main/res/menu/menu_detail_action_bar.xml index 0b76cf9..176b165 100644 --- a/app/src/main/res/menu/menu_detail_action_bar.xml +++ b/app/src/main/res/menu/menu_detail_action_bar.xml @@ -9,9 +9,4 @@ app:showAsAction="ifRoom" android:icon="@drawable/ic_bolt_outline_white_24dp"/> - - - - - diff --git a/app/src/main/res/menu/menu_main_action_bar.xml b/app/src/main/res/menu/menu_main_action_bar.xml index a4ffd11..66a2384 100644 --- a/app/src/main/res/menu/menu_main_action_bar.xml +++ b/app/src/main/res/menu/menu_main_action_bar.xml @@ -5,5 +5,4 @@ app:showAsAction="ifRoom" android:icon="@drawable/ic_notifications_off_time_white_outline_24dp"/> -