{"id":289671,"date":"2018-09-20T17:25:02","date_gmt":"2018-09-20T13:25:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=289671"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=289671","title":{"rendered":"\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f BottomAppBar. \u0427\u0430\u0441\u0442\u044c 2: \u041c\u0435\u043d\u044e \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Navigation Drawer"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p><img decoding=\"async\" src=\"https:\/\/drive.google.com\/uc?id=1jIQA17ukY12KalRZZmDNGXOMPm2C-qjy\" alt=\"\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f BottomAppBar. \u0427\u0430\u0441\u0442\u044c 2: \u041c\u0435\u043d\u044e \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Navigation Drawer\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/post\/421879\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u044b BottomAppBar, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043d\u0430 <a href=\"https:\/\/events.google.com\/io\/\">Google I\/O 2018<\/a> \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c <a href=\"https:\/\/material.io\/develop\/android\/\">Material \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f Android<\/a>. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 BottomAppBar \u0438 \u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b. \u0422\u0430\u043a\u0436\u0435 BottomAppBar \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u043d\u044e \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Navigation Drawer, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 <a href=\"https:\/\/developer.android.com\/reference\/android\/widget\/Toolbar\">\u0442\u0443\u043b\u0431\u0430\u0440\u0435<\/a>.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/drive.google.com\/uc?id=1LQ6AlDngDn4Prl7XPnriGD8RvcWHCQsn\" alt=\"\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u043d\u044e \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Navigation Drawer \u0432 \u0442\u0443\u043b\u0431\u0430\u0440\u0435\"\/><\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u043d\u044e \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Navigation Drawer \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0447\u0430\u0441\u0442\u044c\u044e BottomAppBar. \u0410 \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e \u0438 Navigation Drawer \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 BottomAppBar.<\/p>\n<p>  <\/p>\n<h2 id=\"menyu-bottomappbar\">\u041c\u0435\u043d\u044e BottomAppBar<\/h2>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <em>.xml<\/em> \u0444\u0430\u0439\u043b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>res\/menu<\/em> \u0434\u043b\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0435\u043d\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432 BottomAppBar. \u0412\u043e\u0442 \u043c\u043e\u0439 \u0444\u0430\u0439\u043b <em>bottomappbar_menu.xml<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;menu xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;     xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;      &lt;item         android:id=&quot;@+id\/app_bar_fav&quot;         android:icon=&quot;@drawable\/baseline_favorite_white_24&quot;         android:title=&quot;@string\/action_favorite&quot;         app:showAsAction=&quot;ifRoom&quot;\/&gt;      &lt;item         android:id=&quot;@+id\/app_bar_search&quot;         android:icon=&quot;@drawable\/baseline_search_white_24&quot;         android:title=&quot;@string\/action_search&quot;         app:showAsAction=&quot;ifRoom&quot;\/&gt;     &lt;item         android:id=&quot;@+id\/app_bar_settings&quot;         android:title=&quot;@string\/action_settings&quot;         app:showAsAction=&quot;never&quot;\/&gt; &lt;\/menu&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 MainActivity, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0435 <em>setSupportActionBar(bottom_app_bar)<\/em>, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u043c\u0435\u0442\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code>override fun onCreateOptionsMenu(menu: Menu): Boolean {     val inflater = menuInflater     inflater.inflate(R.menu.bottomappbar_menu, menu)     return true }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u043d\u044e \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 BottomAppBar.<\/p>\n<p>  <\/p>\n<h3 id=\"obrabotka-klikov-po-elementam-menyu\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u0435\u043d\u044e<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u0435\u043d\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 MainActivity:<\/p>\n<p>  <\/p>\n<pre><code>override fun onOptionsItemSelected(item: MenuItem?): Boolean {     when (item!!.itemId) {         R.id.app_bar_fav -&gt; toast(&quot;Fav menu item is clicked!&quot;)         R.id.app_bar_search -&gt; toast(&quot;Search menu item is clicked!&quot;)         R.id.app_bar_settings -&gt; toast(&quot;Settings item is clicked!&quot;)     }      return true }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u043d\u044e \u0432 BottomAppBar \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/drive.google.com\/uc?id=15EhxWPvm1XUQT8GykvR8qLl3uEFTrYqx\" alt=\"\u041a\u043b\u0438\u043a\u0438 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u0435\u043d\u044e \u0432 BottomAppBar\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"element-upravleniya-navigation-drawer-v-bottomappbar\">\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Navigation Drawer \u0432 BottomAppBar<\/h2>\n<p>  <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e Navigation Drawer \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 NavigationView, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421 BottomAppBar \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 Navigation Drawer \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c. \u0422\u0435\u043f\u0435\u0440\u044c Navigation Drawer \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 <a href=\"https:\/\/material.io\/develop\/android\/components\/bottom-sheet-dialog-fragment\/\">\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/drive.google.com\/uc?id=15tE7GZgecE_DVe7-0IQq8W3JzARcXAmJ\" alt=\"\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\"\/><\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u0435\u0440\u0432\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0430\u043c\u043e <a href=\"https:\/\/material.io\/develop\/android\/components\/bottom-sheet-behavior\/\">\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e<\/a>:<\/p>\n<p>  <\/p>\n<p><em>fragment_bottomsheet.xml<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;androidx.constraintlayout.widget.ConstraintLayout     xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;wrap_content&quot;&gt;      &lt;com.google.android.material.navigation.NavigationView         android:id=&quot;@+id\/navigation_view&quot;         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;wrap_content&quot;         android:layout_gravity=&quot;bottom&quot;         android:layout_marginStart=&quot;8dp&quot;         android:layout_marginTop=&quot;8dp&quot;         android:layout_marginEnd=&quot;8dp&quot;         app:layout_constraintEnd_toEndOf=&quot;parent&quot;         app:layout_constraintStart_toStartOf=&quot;parent&quot;         app:layout_constraintTop_toTopOf=&quot;parent&quot;         app:menu=&quot;@menu\/bottom_nav_drawer_menu&quot;\/&gt;  &lt;\/androidx.constraintlayout.widget.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0424\u0430\u0439\u043b \u043c\u0435\u043d\u044e \u0434\u043b\u044f Navigation Drawer \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 <em>res\/menu<\/em>.<\/p>\n<p>  <\/p>\n<p><em>bottom_nav_drawer_menu.xml<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;menu xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;&gt;     &lt;group android:checkableBehavior=&quot;none&quot;&gt;         &lt;item             android:id=&quot;@+id\/nav1&quot;           android:icon=&quot;@drawable\/baseline_exposure_plus_1_black_24&quot;             android:title=&quot;@string\/nav_item1&quot; \/&gt;         &lt;item             android:id=&quot;@+id\/nav2&quot;             android:icon=&quot;@drawable\/baseline_replay_10_black_24&quot;             android:title=&quot;@string\/nav_item2&quot; \/&gt;         &lt;item             android:id=&quot;@+id\/nav3&quot;             android:icon=&quot;@drawable\/baseline_forward_10_black_24&quot;             android:title=&quot;@string\/nav_item3&quot; \/&gt;     &lt;\/group&gt; &lt;\/menu&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0438\u0439 BottomSheetDialogFragment, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code>import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.google.android.material.bottomsheet.BottomSheetDialogFragment  class BottomNavigationDrawerFragment: BottomSheetDialogFragment() {      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {         return inflater.inflate(R.layout.fragment_bottomsheet, container, false)     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043c\u0435\u0442\u043e\u0434 <em>onOptionsItemSelected<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u0435\u043d\u044e. \u041f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043f\u043e \u0437\u043d\u0430\u0447\u043a\u0443 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 BottomNavigationDrawerFragment \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f Navigation View.<\/p>\n<p>  <\/p>\n<pre><code>android.R.id.home -&gt; {     val bottomNavDrawerFragment = BottomNavigationDrawerFragment()     bottomNavDrawerFragment.show(supportFragmentManager, bottomNavDrawerFragment.tag) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043a\u043e\u0434 \u043c\u0430\u043a\u0435\u0442\u0430 MainActivity:<\/p>\n<p>  <\/p>\n<p><em>activity_main.xml<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;&gt;      &lt;TextView         android:layout_width=&quot;wrap_content&quot;         android:layout_height=&quot;wrap_content&quot;         android:text=&quot;Hello World!&quot;         app:layout_constraintBottom_toBottomOf=&quot;parent&quot;         app:layout_constraintLeft_toLeftOf=&quot;parent&quot;         app:layout_constraintRight_toRightOf=&quot;parent&quot;         app:layout_constraintTop_toTopOf=&quot;parent&quot; \/&gt;      &lt;androidx.coordinatorlayout.widget.CoordinatorLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;com.google.android.material.bottomappbar.BottomAppBar             android:id=&quot;@+id\/bottom_app_bar&quot;             android:layout_width=&quot;match_parent&quot;             android:layout_height=&quot;wrap_content&quot;             android:layout_gravity=&quot;bottom&quot;             app:backgroundTint=&quot;@color\/colorPrimary&quot;             app:fabAlignmentMode=&quot;center&quot;             app:fabAttached=&quot;true&quot;             app:navigationIcon=&quot;@drawable\/baseline_menu_white_24&quot;\/&gt;          &lt;com.google.android.material.floatingactionbutton.FloatingActionButton             android:id=&quot;@+id\/fab&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:src=&quot;@drawable\/baseline_add_white_24&quot;             app:layout_anchor=&quot;@id\/bottom_app_bar&quot; \/&gt;      &lt;\/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;  &lt;\/androidx.constraintlayout.widget.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0434\u043b\u044f \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0432 \u043e\u043a\u043d\u0435 Navigation Drawer \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 BottomNavigationDrawerFragment:<\/p>\n<p>  <\/p>\n<pre><code>navigation_view.setNavigationItemSelectedListener { menuItem -&gt;     \/\/ Bottom Navigation Drawer menu item clicks     when (menuItem!!.itemId) {         R.id.nav1 -&gt; context!!.toast(getString(R.string.nav1_clicked))         R.id.nav2 -&gt; context!!.toast(getString(R.string.nav2_clicked))         R.id.nav3 -&gt; context!!.toast(getString(R.string.nav3_clicked))     }     true }<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/drive.google.com\/uc?id=1ZBBQx0eSWUJ6khO3G64Jt0eU1Y3Wh-bH\" alt=\"Navigation Drawer\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/firatkarababa\/BottomAppBar\">Github<\/a>. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u0433\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430, \u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/habr.com\/post\/421879\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/a> \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/habr.com\/post\/421879\/\">\u2190 \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f BottomAppBar. \u0427\u0430\u0441\u0442\u044c 1: Material \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f Android<\/a><\/p>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/421881\/\"> https:\/\/habr.com\/post\/421881\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p><img decoding=\"async\" src=\"https:\/\/drive.google.com\/uc?id=1jIQA17ukY12KalRZZmDNGXOMPm2C-qjy\" alt=\"\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f BottomAppBar. \u0427\u0430\u0441\u0442\u044c 2: \u041c\u0435\u043d\u044e \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Navigation Drawer\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/post\/421879\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u044b BottomAppBar, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043d\u0430 <a href=\"https:\/\/events.google.com\/io\/\">Google I\/O 2018<\/a> \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c <a href=\"https:\/\/material.io\/develop\/android\/\">Material \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f Android<\/a>. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 BottomAppBar \u0438 \u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b. \u0422\u0430\u043a\u0436\u0435 BottomAppBar \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u043d\u044e \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Navigation Drawer, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 <a href=\"https:\/\/developer.android.com\/reference\/android\/widget\/Toolbar\">\u0442\u0443\u043b\u0431\u0430\u0440\u0435<\/a>.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-289671","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/289671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=289671"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/289671\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=289671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=289671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=289671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}