replace bottom actions Properties button with Add to favorites

This commit is contained in:
tibbi 2018-06-19 23:23:18 +02:00
parent 703aa7bbd1
commit 8270aaa2f2
3 changed files with 8 additions and 12 deletions

View File

@ -136,7 +136,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
menu.apply {
findItem(R.id.menu_set_as).isVisible = mMedium?.isImage() == true
findItem(R.id.menu_edit).isVisible = mMedium?.isImage() == true && mUri?.scheme == "file" && !config.bottomActions
findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file" && !config.bottomActions
findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file"
findItem(R.id.menu_share).isVisible = !config.bottomActions
}
@ -178,9 +178,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
}
private fun initBottomActionButtons() {
bottom_properties.setOnClickListener {
showProperties()
}
bottom_favorite.beGone()
bottom_delete.beGone()
bottom_edit.setOnClickListener {
openEditor(mUri!!.toString())
@ -189,8 +188,6 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
bottom_share.setOnClickListener {
sharePath(mUri!!.toString())
}
bottom_delete.beGone()
}
override fun fragmentClicked() {

View File

@ -276,7 +276,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
val currentMedium = getCurrentMedium() ?: return true
menu.apply {
findItem(R.id.menu_properties).isVisible = !config.bottomActions
findItem(R.id.menu_delete).isVisible = !config.bottomActions
findItem(R.id.menu_share).isVisible = !config.bottomActions
findItem(R.id.menu_edit).isVisible = !config.bottomActions
@ -746,8 +745,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
}
private fun initBottomActionButtons() {
bottom_properties.setOnClickListener {
showProperties()
bottom_favorite.setOnClickListener {
}
bottom_edit.setOnClickListener {

View File

@ -10,12 +10,12 @@
android:paddingTop="@dimen/medium_margin">
<ImageView
android:id="@+id/bottom_properties"
android:id="@+id/bottom_favorite"
style="@style/MyBorderlessBackgroundStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_properties"
android:src="@drawable/ic_star_off"
app:layout_constraintEnd_toStartOf="@+id/bottom_edit"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"/>
@ -29,7 +29,7 @@
android:src="@drawable/ic_edit"
app:layout_constraintEnd_toStartOf="@+id/bottom_share"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/bottom_properties"/>
app:layout_constraintStart_toEndOf="@+id/bottom_favorite"/>
<ImageView
android:id="@+id/bottom_share"