Skip to content

Commit

Permalink
Add left and right top round corners for TeiDashboardMobileActivity a…
Browse files Browse the repository at this point in the history
…nd EventCapture in both landscape and portrait (#3625)

* feat: Add round corners to teidashboard landscape

* feat: Add round corners to teidashboard portrait

* fix: Make children respect the round corner of the parent container

* feat: Add round corner to the event capture activity

* feat: Add round corner to event capture portrait

* Trigger builds
  • Loading branch information
yuzalsif authored May 8, 2024
1 parent 3a88adf commit 2634d8e
Show file tree
Hide file tree
Showing 4 changed files with 615 additions and 582 deletions.
318 changes: 163 additions & 155 deletions app/src/main/res/layout-land/activity_dashboard_mobile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,179 +15,187 @@
android:layout_height="match_parent">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/toolbar"
android:id="@+id/backdropLayout"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<ImageView
android:id="@+id/backArrow"
style="@style/ActionIcon"
android:onClick='@{()->presenter.onBackPressed()}'
android:padding="@dimen/default_start_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_back"
tools:ignore="ContentDescription" />

<ImageView
android:id="@+id/syncButton"
style="@style/ActionIcon"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/relationshipMapIcon"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_sync"
app:tint="?colorOnPrimary"
tools:ignore="ContentDescription" />

<ImageView
android:id="@+id/relationshipMapIcon"
style="@style/ActionIcon"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/moreOptions"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_map"
app:tint="@color/white"
tools:ignore="ContentDescription"
tools:visibility="visible" />

<ImageView
android:id="@+id/moreOptions"
style="@style/ActionIcon"
android:layout_height="match_parent"
android:onClick="showMoreOptions"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_more"
tools:ignore="ContentDescription" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/progressGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_end="10dp" />

<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/toolbarProgress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_height="match_parent"
android:background="?colorPrimary">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
android:padding="0dp"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/progressGuideline"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_height="?attr/actionBarSize"
android:background="?colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/main_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar">

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline25"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent=".3" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent=".50" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline625"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent=".70" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline75"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent=".75" />
<ImageView
android:id="@+id/backArrow"
style="@style/ActionIcon"
android:onClick='@{()->presenter.onBackPressed()}'
android:padding="@dimen/default_start_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_back"
tools:ignore="ContentDescription" />

<ImageView
android:id="@+id/syncButton"
style="@style/ActionIcon"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/relationshipMapIcon"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_sync"
app:tint="?colorOnPrimary"
tools:ignore="ContentDescription" />

<ImageView
android:id="@+id/relationshipMapIcon"
style="@style/ActionIcon"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/moreOptions"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_map"
app:tint="@color/white"
tools:ignore="ContentDescription"
tools:visibility="visible" />

<ImageView
android:id="@+id/moreOptions"
style="@style/ActionIcon"
android:layout_height="match_parent"
android:onClick="showMoreOptions"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_more"
tools:ignore="ContentDescription" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/progressGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_end="10dp" />

<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/toolbarProgress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
android:padding="0dp"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/progressGuideline"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tei_primary_color_view"
android:layout_width="0dp"
android:id="@+id/main_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@drawable/ic_front_home_backdrop_bg"
android:clipToOutline="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/guideline25"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toBottomOf="@id/toolbar">

<FrameLayout
android:id="@+id/tei_main_view"
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline25"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent=".3" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent=".50" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline625"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent=".70" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline75"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent=".75" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tei_primary_color_view"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@id/guideline25"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent">

</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/tei_main_view"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

<FrameLayout
android:id="@+id/tei_form_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:elevation="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/guideline625"
app:layout_constraintStart_toEndOf="@id/guideline25"
app:layout_constraintTop_toTopOf="parent">

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/saveLand"
style="@style/Widget.MaterialComponents.FloatingActionButton"
android:layout_width="wrap_content"
<FrameLayout
android:id="@+id/tei_form_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:elevation="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/guideline625"
app:layout_constraintStart_toEndOf="@id/guideline25"
app:layout_constraintTop_toTopOf="parent">

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/saveLand"
style="@style/Widget.MaterialComponents.FloatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
app:backgroundTint="?colorPrimary"
app:srcCompat="@drawable/ic_save"
app:tint="@color/white" />
</FrameLayout>

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/tei_table_pager"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/navigationBar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline625"
app:layout_constraintTop_toTopOf="parent" />

<org.dhis2.utils.customviews.navigationbar.NavigationBottomBar
android:id="@+id/navigationBar"
style="@style/DhisBottomNavigationView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
app:backgroundTint="?colorPrimary"
app:srcCompat="@drawable/ic_save"
app:tint="@color/white" />
</FrameLayout>

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/tei_table_pager"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/navigationBar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline625"
app:layout_constraintTop_toTopOf="parent" />

<org.dhis2.utils.customviews.navigationbar.NavigationBottomBar
android:id="@+id/navigationBar"
style="@style/DhisBottomNavigationView"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:forceShowAnalytics="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/guideline625"
app:menu="@menu/navigation_dashboard_landscape_menu" />
app:forceShowAnalytics="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/guideline625"
app:menu="@menu/navigation_dashboard_landscape_menu" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
Loading

0 comments on commit 2634d8e

Please sign in to comment.