Create landscape layout for StopwatchFragment

This commit is contained in:
Phillip Hsu 2016-08-30 02:20:17 -07:00
parent c0553b85b7
commit be9aca1ede
2 changed files with 65 additions and 53 deletions

View File

@ -200,7 +200,8 @@ public class StopwatchFragment extends RecyclerViewFragment<
} else { } else {
// I verified the bar was visible already without this, so we probably don't need this, // I verified the bar was visible already without this, so we probably don't need this,
// but it's just a safety measure.. // but it's just a safety measure..
mSeekBar.setVisibility(View.VISIBLE); // ACTUALLY NOT A SAFETY MEASURE!
// mSeekBar.setVisibility(View.VISIBLE);
ProgressBarUtils.setProgress(mSeekBar, getCurrentLapProgressRatio()); ProgressBarUtils.setProgress(mSeekBar, getCurrentLapProgressRatio());
} }
} else { } else {

View File

@ -1,45 +1,45 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout <android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="horizontal"
android:layout_above="@+id/mini_fab_layout">
<com.philliphsu.clock2.stopwatch.ChronometerWithMillis <com.philliphsu.clock2.stopwatch.ChronometerWithMillis
android:id="@+id/chronometer" android:id="@+id/chronometer"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_weight="1"
android:padding="16dp" android:padding="16dp"
android:background="@color/colorPrimary" android:background="@color/colorPrimary"
android:gravity="center_horizontal" android:gravity="center"
android:textSize="@dimen/text_size_display_3" android:textSize="@dimen/text_size_display_3"
style="@style/TextAppearance.AppCompat.Inverse" style="@style/TextAppearance.AppCompat.Inverse"/>
android:layout_marginBottom="8dp"/>
<!-- RecyclerView --> <include layout="@layout/fragment_recycler_view"
<include layout="@layout/fragment_recycler_view"/> android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginTop="8dp"/>
</LinearLayout> </LinearLayout>
<com.philliphsu.clock2.UntouchableSeekBar
android:id="@+id/seek_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_anchor="@id/chronometer"
app:layout_anchorGravity="bottom"
android:paddingStart="0dp"
android:paddingEnd="0dp"/>
<!-- TODO: dimen resource for height --> <!-- TODO: dimen resource for height -->
<android.support.v7.widget.GridLayout <android.support.v7.widget.GridLayout
android:id="@id/mini_fab_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="88dp" android:layout_height="88dp"
android:layout_gravity="bottom" android:layout_alignParentBottom="true"
app:columnCount="2"> app:columnCount="2">
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
@ -68,4 +68,15 @@
</android.support.v7.widget.GridLayout> </android.support.v7.widget.GridLayout>
</RelativeLayout>
<com.philliphsu.clock2.UntouchableSeekBar
android:id="@+id/seek_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_anchor="@id/mini_fab_layout"
app:layout_anchorGravity="top"
android:paddingStart="0dp"
android:paddingEnd="0dp"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>