Pro Android with Kotlin


CHAPTER 9: User Interface


Download 5.42 Mb.
Pdf ko'rish
bet195/223
Sana04.11.2023
Hajmi5.42 Mb.
#1746807
1   ...   191   192   193   194   195   196   197   198   ...   223
Bog'liq
@de android telegram Pro Android with Kotlin Developing Modern Mobile



246
CHAPTER 9: User Interface
The XML definition goes to a standard menu XML file, for example res/context_menu.xml.

"http://schemas.android.com/apk/res/android">
android:title="@string/ctxtitle_item1"/>
android:title="@string/ctxtitle_item2"/>

It is also possible to open a context menu programmatically by using openContextMenu( 
someView ) inside an activity.
Contextual Action Mode
The contextual action mode signs responsible for a context-relative app bar. While the app 
bar is static to the app, a contextual action mode is view specific. What you have to do for 
this kind of context menu is the following:
1. Implement the ActionMode.Callback interface.

Download 5.42 Mb.

Do'stlaringiz bilan baham:
1   ...   191   192   193   194   195   196   197   198   ...   223




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling