Last active
December 4, 2018 07:17
-
-
Save mayojava/6497624952d9a53e2c6c20fc3ab2e1e2 to your computer and use it in GitHub Desktop.
home_fragment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="320dp" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:orientation="vertical" | |
android:id="@+id/left_guide" | |
app:layout_constraintGuide_begin="16dp"/> | |
<androidx.constraintlayout.widget.Guideline android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:id="@+id/right_guide" | |
app:layout_constraintGuide_end="16dp"/> | |
<TextView | |
android:id="@+id/text_view_competitions" | |
android:text="@string/competitions" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
app:layout_constraintTop_toTopOf="parent" | |
app:layout_constraintLeft_toRightOf="@id/left_guide" | |
app:layout_constraintRight_toLeftOf="@id/right_guide"/> | |
<androidx.cardview.widget.CardView android:layout_width="80dp" | |
android:layout_height="80dp" | |
android:id="@+id/image_champions_league" | |
app:layout_constraintLeft_toRightOf="@id/left_guide" | |
app:layout_constraintRight_toLeftOf="@id/image_premier_league" | |
app:layout_constraintTop_toBottomOf="@id/text_view_competitions" | |
app:layout_constraintBottom_toTopOf="@id/image_bundesliga" | |
app:layout_constraintHorizontal_chainStyle="spread" | |
app:layout_constraintVertical_chainStyle="spread" | |
android:background="@drawable/champions_league"> | |
<ImageView | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:scaleType="centerCrop" | |
android:src="@drawable/champions_league"/> | |
</androidx.cardview.widget.CardView> | |
<ImageView | |
android:id="@+id/image_premier_league" | |
app:layout_constraintLeft_toRightOf="@id/image_champions_league" | |
app:layout_constraintRight_toLeftOf="@id/image_laliga" | |
app:layout_constraintTop_toBottomOf="@id/text_view_competitions" | |
app:layout_constraintBottom_toTopOf="@id/serie_a" | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:scaleType="centerCrop" | |
android:src="@drawable/premiership"/> | |
<ImageView | |
android:id="@+id/image_laliga" | |
app:layout_constraintLeft_toRightOf="@id/image_premier_league" | |
app:layout_constraintRight_toLeftOf="@id/right_guide" | |
app:layout_constraintTop_toBottomOf="@id/text_view_competitions" | |
app:layout_constraintBottom_toTopOf="@id/ligue_one" | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:scaleType="fitCenter" | |
android:src="@drawable/laliga"/> | |
<ImageView | |
android:id="@+id/image_bundesliga" | |
app:layout_constraintLeft_toRightOf="@id/left_guide" | |
app:layout_constraintRight_toLeftOf="@id/serie_a" | |
app:layout_constraintTop_toBottomOf="@id/image_champions_league" | |
app:layout_constraintBottom_toTopOf="@id/portuguese" | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:scaleType="centerCrop" | |
android:src="@drawable/bundesliga"/> | |
<ImageView | |
android:id="@+id/serie_a" | |
app:layout_constraintLeft_toRightOf="@id/image_bundesliga" | |
app:layout_constraintRight_toLeftOf="@id/ligue_one" | |
app:layout_constraintTop_toBottomOf="@id/image_premier_league" | |
app:layout_constraintBottom_toTopOf="@id/portuguese" | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:scaleType="centerCrop" | |
android:src="@drawable/serie_a"/> | |
<ImageView | |
android:id="@+id/ligue_one" | |
app:layout_constraintLeft_toRightOf="@id/serie_a" | |
app:layout_constraintRight_toLeftOf="@id/right_guide" | |
app:layout_constraintTop_toBottomOf="@id/image_laliga" | |
app:layout_constraintBottom_toTopOf="@id/eredivise" | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:scaleType="centerCrop" | |
android:src="@drawable/ligue_one"/> | |
<ImageView | |
android:id="@+id/portuguese" | |
app:layout_constraintLeft_toRightOf="@id/left_guide" | |
app:layout_constraintRight_toLeftOf="@id/ligue_one" | |
app:layout_constraintTop_toBottomOf="@id/image_bundesliga" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintHorizontal_chainStyle="spread" | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:scaleType="centerCrop" | |
android:src="@drawable/portuguese"/> | |
<ImageView | |
android:id="@+id/eredivise" | |
app:layout_constraintLeft_toRightOf="@id/portuguese" | |
app:layout_constraintRight_toLeftOf="@id/right_guide" | |
app:layout_constraintTop_toBottomOf="@id/serie_a" | |
app:layout_constraintBottom_toBottomOf="parent" | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:scaleType="centerCrop" | |
android:src="@drawable/eredivise"/> | |
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.coordinatorlayout.widget.CoordinatorLayout | |
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" | |
android:fitsSystemWindows="true" | |
android:id="@+id/main_content_host"> | |
<com.google.android.material.appbar.AppBarLayout | |
android:id="@+id/host_app_bar" | |
android:layout_width="match_parent" | |
android:layout_height="320dp" | |
android:background="@android:color/transparent" | |
android:fitsSystemWindows="true"> | |
<com.google.android.material.appbar.CollapsingToolbarLayout | |
android:id="@+id/collapse_toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:fitsSystemWindows="true" | |
app:contentScrim="?attr/colorPrimary" | |
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" | |
app:titleEnabled="false"> | |
<include layout="@layout/competitions" /> | |
<View | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:alpha="0.3" | |
android:background="@android:color/black" | |
android:fitsSystemWindows="true"/> | |
<androidx.appcompat.widget.Toolbar | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
android:layout_gravity="top" | |
android:layout_marginBottom="48dp" | |
app:layout_collapseMode="pin" | |
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light"/> | |
<com.google.android.material.tabs.TabLayout | |
android:id="@+id/mytabs" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_gravity="bottom" | |
app:tabIndicatorColor="@android:color/white" | |
app:tabSelectedTextColor="@android:color/white" | |
app:tabTextColor="@android:color/white" | |
app:tabMode="fixed" /> | |
</com.google.android.material.appbar.CollapsingToolbarLayout> | |
</com.google.android.material.appbar.AppBarLayout> | |
<androidx.viewpager.widget.ViewPager | |
android:id="@+id/viewpager" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior"/> | |
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All
ImageViews
incompetitions.xml
will be wrapped inside aCardView
like the first one so it appears clickable.