Manage multiple layout sizes

feature/top10
Aurelien Hubert 7 years ago
parent fd8a0edb5d
commit dc8ef3a63f
  1. 95
      app/src/main/res/layout-sw320dp/fragment_calendar.xml
  2. 99
      app/src/main/res/layout-sw420dp/fragment_calendar.xml
  3. 43
      app/src/main/res/layout/fragment_calendar.xml

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:theme="@style/PokerAnalyticsTheme.Toolbar.Session"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_margin="8dp"
android:orientation="vertical">
<com.google.android.material.chip.ChipGroup
android:id="@+id/filtersTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:singleSelection="false"
app:chipSpacing="6dp">
<com.google.android.material.chip.Chip
android:id="@+id/filterTimeMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/month"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterTimeYear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/year"/>
</com.google.android.material.chip.ChipGroup>
<com.google.android.material.chip.ChipGroup
android:id="@+id/filtersSession"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:singleSelection="false"
app:chipSpacing="6dp">
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionAll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/all"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionCash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cash_game"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionTournament"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tournament"/>
</com.google.android.material.chip.ChipGroup>
</LinearLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable">
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
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_toBottomOf="@+id/appBar" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:theme="@style/PokerAnalyticsTheme.Toolbar.Session"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="8dp"
android:orientation="horizontal">
<com.google.android.material.chip.ChipGroup
android:id="@+id/filtersTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:singleSelection="false"
app:chipSpacing="8dp">
<com.google.android.material.chip.Chip
android:id="@+id/filterTimeMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/month"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterTimeYear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/year"/>
</com.google.android.material.chip.ChipGroup>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<com.google.android.material.chip.ChipGroup
android:id="@+id/filtersSession"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:singleSelection="false"
app:chipSpacing="6dp">
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionAll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/all"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionCash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cash_game"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionTournament"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tournament"/>
</com.google.android.material.chip.ChipGroup>
</LinearLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable">
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
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_toBottomOf="@+id/appBar" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -18,48 +18,61 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="8dp"
android:orientation="horizontal">
<com.google.android.material.chip.ChipGroup
android:id="@+id/filters"
android:id="@+id/filtersTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:singleSelection="false"
app:chipSpacing="6dp">
app:chipSpacing="8dp">
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionAll"
android:id="@+id/filterTimeMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/all"/>
android:text="@string/month"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionCash"
android:id="@+id/filterTimeYear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cash_game"/>
android:text="@string/year"/>
</com.google.android.material.chip.ChipGroup>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<com.google.android.material.chip.ChipGroup
android:id="@+id/filtersSession"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:singleSelection="false"
app:chipSpacing="6dp">
<com.google.android.material.chip.Chip
android:id="@+id/filterSessionTournament"
android:id="@+id/filterSessionAll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tournament"/>
android:checked="true"
android:text="@string/all"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterTimeMonth"
android:id="@+id/filterSessionCash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:checked="true"
android:text="@string/month"/>
android:text="@string/cash_game"/>
<com.google.android.material.chip.Chip
android:id="@+id/filterTimeYear"
android:id="@+id/filterSessionTournament"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/year"/>
android:text="@string/tournament"/>
</com.google.android.material.chip.ChipGroup>

Loading…
Cancel
Save