Skip to content

Commit

Permalink
Merge pull request iSoron#459 from chennemann/feat/scroll-bar-in-main…
Browse files Browse the repository at this point in the history
…-menu

Add scrollbars to habit overview list
  • Loading branch information
iSoron authored Jan 22, 2019
2 parents 1780614 + d889475 commit a719f6a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import android.view.*
import com.google.auto.factory.*
import dagger.*
import org.isoron.androidbase.activities.*
import org.isoron.uhabits.R
import org.isoron.uhabits.activities.common.views.*
import org.isoron.uhabits.core.models.*

Expand All @@ -37,7 +38,7 @@ class HabitCardListView(
@Provided private val adapter: HabitCardListAdapter,
@Provided private val cardViewFactory: HabitCardViewFactory,
@Provided private val controller: Lazy<HabitCardListController>
) : RecyclerView(context) {
) : RecyclerView(context, null, R.attr.scrollableRecyclerViewStyle) {

var checkmarkCount: Int = 0

Expand Down
4 changes: 4 additions & 0 deletions uhabits-android/src/main/res/layout/about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
style="@style/About.Item"
android:text="Victor Yu"/>

<TextView
style="@style/About.Item"
android:text="Christoph Hennemann"/>

</LinearLayout>

<LinearLayout
Expand Down
2 changes: 2 additions & 0 deletions uhabits-android/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@
<attr name="cardBackground" format="reference"/>
<attr name="headerBackground" format="reference"/>
<attr name="selectedBackground" format="reference"/>

<attr name="scrollableRecyclerViewStyle" format="reference"/>
</resources>
8 changes: 8 additions & 0 deletions uhabits-android/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
<item name="aboutScreenColor">@color/blue_800</item>
<item name="widgetShadowAlpha">0.25</item>
<item name="widgetBackgroundAlpha">1</item>

<item name="scrollableRecyclerViewStyle">@style/ScrollableRecyclerViewStyle</item>
</style>

<style name="SmallSpinner">
Expand Down Expand Up @@ -120,6 +122,8 @@

<item name="widgetShadowAlpha">0.25</item>
<item name="widgetBackgroundAlpha">1</item>

<item name="scrollableRecyclerViewStyle">@style/ScrollableRecyclerViewStyle</item>
</style>

<style name="AppBaseThemeDark.PureBlack">
Expand Down Expand Up @@ -254,4 +258,8 @@
parent="@style/Theme.AppCompat.Dialog">
<item name="windowNoTitle">false</item>
</style>

<style name="ScrollableRecyclerViewStyle" parent="android:Widget">
<item name="android:scrollbars">vertical</item>
</style>
</resources>

0 comments on commit a719f6a

Please sign in to comment.