6
私はthis tutorialの後に続きます。画面の一番下にTabLayoutという簡単な変更を加えました。タブの上にタブインジケータを表示する方法
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager_landing"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:background="@android:color/white" />
<android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs_landing"
style="@style/MyCustomTabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed" />
</LinearLayout>
問題: -
TabIndicator
ではなく、今、私はタブの上部にTabIndicator
ことを示したい、うまく機能して、画面の下部に表示されます底よりも。 カスタムレイアウトを使用すると、チュートリアルで述べたように行うことができますが、上部にTabIndicator
と表示されるxml属性はありますか?
は、あなたのXMLコードを置きます。 thx – Fakher
@Fakher xmlを投稿しました –
@Nileshこれを達成しましたか?私はまた、上にタブインジケータを表示したい。 –