Format menu_timeline
This commit is contained in:
parent
b1c4ca7816
commit
f8e7ba7355
|
@ -40,6 +40,7 @@ import android.widget.TextView
|
|||
import android.widget.Toast
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.appcompat.view.menu.MenuBuilder
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
import androidx.core.net.toUri
|
||||
|
@ -982,7 +983,11 @@ class TimelineFragment @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
if (isThreadTimeLine()) {
|
||||
if (menu is MenuBuilder) menu.setOptionalIconsVisible(true)
|
||||
}
|
||||
super.onCreateOptionsMenu(menu, inflater)
|
||||
// We use a custom layout for this menu item, so we need to set a ClickListener
|
||||
menu.findItem(R.id.open_matrix_apps)?.let { menuItem ->
|
||||
|
|
|
@ -41,12 +41,13 @@
|
|||
android:id="@+id/menu_timeline_thread_list"
|
||||
android:title="@string/action_view_threads"
|
||||
android:visible="false"
|
||||
app:iconTint="?colorPrimary"
|
||||
app:actionLayout="@layout/view_thread_notification_badge"
|
||||
app:iconTint="?colorPrimary"
|
||||
app:showAsAction="always"
|
||||
tools:visible="true" />
|
||||
|
||||
<item android:id="@+id/join_conference"
|
||||
<item
|
||||
android:id="@+id/join_conference"
|
||||
android:title="@string/action_join"
|
||||
app:actionLayout="@layout/layout_join_conference_action"
|
||||
app:showAsAction="always" />
|
||||
|
@ -70,20 +71,19 @@
|
|||
android:icon="@drawable/ic_thread_view_in_room_menu_item"
|
||||
android:title="@string/action_thread_view_in_room"
|
||||
app:iconTint="?vctr_content_secondary"
|
||||
app:showAsAction="never" />
|
||||
app:showAsAction="withText" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_thread_timeline_copy_link"
|
||||
android:icon="@drawable/ic_thread_link_menu_item"
|
||||
android:title="@string/action_thread_copy_link_to_thread"
|
||||
app:iconTint="?vctr_content_secondary"
|
||||
app:showAsAction="never" />
|
||||
app:showAsAction="withText" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_thread_timeline_share"
|
||||
android:icon="@drawable/ic_thread_share_menu_item"
|
||||
android:title="@string/action_share"
|
||||
app:iconTint="?vctr_content_secondary"
|
||||
app:showAsAction="never" />
|
||||
|
||||
app:showAsAction="withText" />
|
||||
</menu>
|
Loading…
Reference in New Issue