Second verion (only increase a little bit Compact height)
This commit is contained in:
parent
33e13748ca
commit
363fe638af
2 changed files with 2 additions and 6 deletions
|
@ -225,11 +225,7 @@ class MainActivity : NoSplashAppCompatActivity() {
|
|||
if (sp.getBoolean(R.string.key_short_tabtitles, false)) {
|
||||
tabs_normal.visibility = View.GONE
|
||||
tabs_compact.visibility = View.VISIBLE
|
||||
val typedValue = TypedValue()
|
||||
if (theme.resolveAttribute(R.attr.actionBarSize, typedValue, true)) {
|
||||
toolbar.layoutParams = LinearLayout.LayoutParams(Toolbar.LayoutParams.MATCH_PARENT,
|
||||
TypedValue.complexToDimensionPixelSize(typedValue.data, resources.displayMetrics))
|
||||
}
|
||||
toolbar.layoutParams = LinearLayout.LayoutParams(Toolbar.LayoutParams.MATCH_PARENT, resources.getDimension(R.dimen.compact_height).toInt())
|
||||
TabLayoutMediator(tabs_compact, main_pager) { tab, position ->
|
||||
tab.text = (main_pager.adapter as TabPageAdapter).getPluginAt(position).nameShort
|
||||
}.attach()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="compact_height">30dp</dimen>
|
||||
<dimen name="compact_height">42dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding_top">8dp</dimen>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue