0
左の引き出しアイコン、右のメニューアイテム、およびプレイストアや添付された画面に類似した検索ビューを持ち、パディングを持つツールバーを作成する方法。私が直面している問題はツールバーのパディングであり、ツールバーは常にコーナーに付けられています。パディングとメニューオプション付きのAndroidツールバー
XMLコード:
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"><!--scroll|exitUntilCollapsed-->
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed">
<fragment
android:id="@+id/frg_searcheader"
class="com.vconnect.store.ui.fragment.searchpage.HomePageHeaderPagerFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar_actionbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:minHeight="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/Widget.AppCompat.Light.ActionBar" />
</android.support.design.widget.CollapsingToolbarLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/dark_gray"
android:clickable="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:tabGravity="fill" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
[Playストア画面]
あなたがこれまでに書いたツールバー/ xmlコードを共有することができればそれは素晴らしいことです。 –
あなたの質問は広すぎます。 –
@AshishRanjanは –