1
我tablayout:TabLayout模式滾動不適合以及針對平板電腦
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable"/>
你可以看到我有3個標籤:at,after和recurrence。在手機上,標籤寬度不一樣,因此它們可以非常適合DialogFragment
。但在平板電腦上,它們的寬度變得相同,即使這三個字的長度也是非常不同的。我的SDK版本是Android 4.1(手機)和4.3(平板電腦,我也在4.4和同樣的問題上測試它)。我怎樣才能解決這個問題?
我明白了。現在,我在'layout.xml'中爲'TabLayout'添加'app:tabMinWidth =「56dp」',它變得很好。謝謝。 – ywwynm
如果它幫助你然後標記它接受答案? – 2016-03-04 04:43:49