Skip to content

Commit

Permalink
Fixed displaying issues on different devices
Browse files Browse the repository at this point in the history
  • Loading branch information
arburk committed Jul 16, 2023
1 parent 581fb46 commit 295d082
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ class TimerService : Service(), SharedPreferences.OnSharedPreferenceChangeListen
}

private fun resetTimerTaskToMaxTime() {
// TODO: remove -50 after testing
remainingSeconds = config.minPerRound * 60 - 50
remainingSeconds = config.minPerRound * 60
updateViewModels()
}

Expand Down
12 changes: 8 additions & 4 deletions app/src/main/res/layout/fragment_round_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:id="@+id/rounds_table"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="vertical"
android:scrollIndicators="right"
tools:context=".activity.RoundSettings">

<ListView
android:id="@+id/rounds_row_list_view"
tools:listitem="@layout/round_settings_row"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="550dp"/>
android:layout_height="@dimen/list_view_rounds_height"/>

<LinearLayout
android:orientation="horizontal"
android:id="@+id/add_remove_layout"
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="50dp">
android:layout_height="wrap_content">

<ImageButton
android:id="@+id/remove_last_blind_button"
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/timer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="50dp">
android:paddingTop="@dimen/table_row_poker_timer_play_pause_padding_top">

<ImageButton
android:id="@+id/prev_blind"
Expand Down Expand Up @@ -96,7 +96,7 @@
android:text="big"
android:layout_width="match_parent"
android:textSize="@dimen/timer_button_next_prev_text_size"
android:padding="50dp"
android:paddingTop="@dimen/tv_big_blind_padding_top"
android:fontFamily="@font/dosis_extrabold"
android:textAlignment="center"/>

Expand All @@ -106,7 +106,6 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginBottom="16dp"
android:backgroundTint="@color/purple_500"
android:src="@drawable/edit_pen"
android:contentDescription="@string/btn_desc_blind_config"/>
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values-h1200dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="table_row_poker_timer_play_pause_padding_top">50dp</dimen>
<dimen name="tv_big_blind_padding_top">50dp</dimen>
<dimen name="list_view_rounds_height">600dp</dimen>
</resources>
5 changes: 4 additions & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<resources>
<dimen name="fab_margin">16dp</dimen>
<dimen name="timer_button_play_pause_width">14dp</dimen>
<dimen name="timer_button_play_pause_width">30dp</dimen>
<dimen name="timer_button_play_pause_margin">20dp</dimen>
<dimen name="timer_button_next_prev_text_size">96sp</dimen>
<dimen name="timer_button_next_prev_padding">25dp</dimen>
<dimen name="table_row_poker_timer_play_pause_padding_top">10dp</dimen>
<dimen name="tv_big_blind_padding_top">30dp</dimen>
<dimen name="list_view_rounds_height">450dp</dimen>
</resources>

0 comments on commit 295d082

Please sign in to comment.