Skip to content

Commit

Permalink
Include all kinds of shitty workarounds for compat
Browse files Browse the repository at this point in the history
  • Loading branch information
abarisain committed Jun 6, 2015
1 parent d17caad commit d7fd40f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions MPDroid/src/main/res/layout/library_tabs_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="?attr/libraryPagerBottomMargin"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

</android.support.design.widget.CoordinatorLayout>
6 changes: 5 additions & 1 deletion MPDroid/src/main/res/layout/streams_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,16 @@
android:text="@string/no_result" />
</ScrollView>

<!-- Shitty padding workaround for the collapsable actionbar issue -->
<com.melnykov.fab.FloatingActionButton
android:id="@+id/streamAddButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="?attr/streamsFabBottomMargin"
android:src="@drawable/ic_fab_add"
fab:fab_colorNormal="@color/fab_color"
fab:fab_colorPressed="@color/fab_color_pressed"
Expand Down
4 changes: 4 additions & 0 deletions MPDroid/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="streamsFabBottomMargin">80dp</item>
<item name="libraryPagerBottomMargin">0dp</item>
</style>

<style name="AppThemeBase.Light" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:colorPrimary">@color/actionbar_background_blue</item>
<item name="android:colorPrimaryDark">@color/statusbar_background_blue</item>
<item name="android:colorAccent">@color/accent_blue</item>
<item name="streamsFabBottomMargin">80dp</item>
<item name="libraryPagerBottomMargin">0dp</item>
</style>

</resources>
3 changes: 3 additions & 0 deletions MPDroid/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<attr name="listItemSecondaryTextColor" format="color" />
<attr name="toolbarPopupTheme" format="reference" />
<attr name="nowPlayingSongInfoBackground" format="reference" />

<attr name="streamsFabBottomMargin" format="dimension" />
<attr name="libraryPagerBottomMargin" format="dimension" />
</declare-styleable>

</resources>
10 changes: 8 additions & 2 deletions MPDroid/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@
<item name="background">@drawable/tab_indicator_ab_light</item>
</style>

<style name="AppThemeBase" parent="Theme.AppCompat" />
<style name="AppThemeBase" parent="Theme.AppCompat">
<item name="streamsFabBottomMargin">16dp</item>
<item name="libraryPagerBottomMargin">?attr/actionBarSize</item>
</style>

<style name="AppThemeBase.Light" parent="Theme.AppCompat.Light.DarkActionBar" />
<style name="AppThemeBase.Light" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="streamsFabBottomMargin">16dp</item>
<item name="libraryPagerBottomMargin">?attr/actionBarSize</item>
</style>

<style name="AppTheme" parent="@style/AppThemeBase">
<item name="colorPrimary">@color/nowplaying_background</item>
Expand Down

0 comments on commit d7fd40f

Please sign in to comment.