Skip to content
This repository has been archived by the owner on Jun 21, 2018. It is now read-only.

Commit

Permalink
Fix seekArc top clipping issue #31
Browse files Browse the repository at this point in the history
- RelativeLayout centerInParent replaced by FrameLayout center gravity
- Moved Toolbar below Wrapper (xml order)
- couldn't fix issue using fitsSystemWindows
  • Loading branch information
mudar committed Jan 29, 2018
1 parent 4d7c7e7 commit 63ad616
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions PeaceOfMind+/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,35 @@
android:scaleType="fitXY"
bind:isAtPeaceAnim="@{viewModel.isAtPeace}" />

<RelativeLayout
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:theme="@style/AppTheme.AppBarOverlay"
app:elevation="0dp">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:fitsSystemWindows="true"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:title="@{viewModel.title}" />

</android.support.design.widget.AppBarLayout>

<FrameLayout
style="@style/mainWrapper"
android:background="@color/transparent"
android:paddingBottom="16dp"
android:paddingTop="?attr/actionBarSize">

<com.triggertrap.seekarc.SeekArc
android:id="@+id/progress_bar"
style="@style/circularProgressBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:layout_margin="56dp"
bind:seekArcProgress="@{viewModel.progressBarProgress}"
Expand All @@ -69,7 +87,6 @@
style="@style/circularSeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:layout_margin="16dp"
bind:seekArcMax="@{viewModel.maxDuration}"
Expand All @@ -79,7 +96,7 @@
android:id="@+id/time_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:background="?attr/selectableItemBackgroundBorderless"
android:gravity="center_horizontal"
android:onClick="@{() -> viewModel.toggleDisplayMode()}"
Expand Down Expand Up @@ -108,7 +125,7 @@
bind:displayMode="@{viewModel.displayMode}" />
</LinearLayout>

</RelativeLayout>
</FrameLayout>

<FrameLayout
android:layout_width="match_parent"
Expand All @@ -126,23 +143,6 @@

</FrameLayout>

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:theme="@style/AppTheme.AppBarOverlay"
app:elevation="0dp">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:fitsSystemWindows="true"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:title="@{viewModel.title}" />

</android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>

Expand Down

0 comments on commit 63ad616

Please sign in to comment.