<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <androidx.core.widget.NestedScrollView
        android:orientation="vertical"
        android:background="?attr/primaryBackgroundColor"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:padding="@dimen/dimen8dp"
            android:orientation="vertical"
            android:id="@+id/repoInfoLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/repoIsArchived"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:layout_gravity="center"
                android:text="@string/archivedRepositoryMessage"
                android:background="@drawable/shape_archived"
                android:padding="@dimen/dimen10dp"
                android:layout_marginBottom="@dimen/dimen10dp"
                android:textStyle="bold"
                android:textSize="@dimen/dimen14sp"
                android:textColor="?attr/fabColor" />

            <com.google.android.material.card.MaterialCardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="?attr/materialCardViewElevatedStyle"
                app:cardElevation="@dimen/dimen0dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:foreground="?android:attr/selectableItemBackground"
                    android:background="?attr/materialCardBackgroundColor"
                    android:padding="@dimen/dimen12dp"
                    android:orientation="vertical">

                    <LinearLayout
                        android:id="@+id/repoMetaFrameHeader"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:minHeight="@dimen/dimen48dp"
                        android:orientation="horizontal">

                        <TextView
                            android:id="@+id/repoMetaData"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:text="@string/repoMetaData"
                            android:textSize="@dimen/dimen16sp"
                            android:paddingTop="@dimen/dimen10dp"
                            android:layout_weight="0.9"
                            android:gravity="center_vertical"
                            android:paddingBottom="@dimen/dimen10dp"
                            android:paddingStart="@dimen/dimen0dp"
                            android:paddingEnd="@dimen/dimen0dp"
                            android:textColor="?attr/hintColor"/>

                        <ImageView
                            android:id="@+id/repoMetaDataExpandCollapse"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="0.1"
                            android:layout_gravity="center_vertical|end"
                            android:background="?android:attr/selectableItemBackgroundBorderless"
                            android:contentDescription="@string/generalImgContentText"
                            app:srcCompat="@drawable/ic_chevron_down"/>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/repoMetaFrame"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal">

                            <TextView
                                android:id="@+id/repoMetaOwner"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:textColor="?attr/primaryTextColor"
                                android:textSize="@dimen/dimen22sp"
                                android:textStyle="bold"/>

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:textColor="?attr/primaryTextColor"
                                android:layout_marginBottom="@dimen/dimen6dp"
                                android:layout_marginStart="@dimen/dimen6dp"
                                android:layout_marginEnd="@dimen/dimen6dp"
                                android:text="/"
                                android:textSize="@dimen/dimen22sp"
                                android:textStyle="bold"
                                tools:ignore="HardcodedText"/>

                            <TextView
                                android:id="@+id/repoMetaName"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:textColor="?attr/primaryTextColor"
                                android:layout_marginBottom="@dimen/dimen6dp"
                                android:textSize="@dimen/dimen22sp"
                                android:textStyle="bold"/>

                        </LinearLayout>

                        <TextView
                            android:id="@+id/repoMetaDescription"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="@dimen/dimen16dp"
                            android:autoLink="web"
                            android:ellipsize="end"
                            android:maxLines="3"
                            android:textColor="?attr/primaryTextColor"
                            android:textColorLink="@color/lightBlue"
                            android:textSize="@dimen/dimen16sp"/>

                        <com.google.android.material.card.MaterialCardView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            style="?attr/materialCardViewElevatedStyle"
                            android:backgroundTint="@android:color/transparent"
                            app:cardElevation="@dimen/dimen0dp">

                            <org.mian.gitnex.helpers.languagestatistics.LanguageStatisticsBar
                                android:id="@+id/languages_statistic"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:thumbTint="@android:color/transparent"
                                android:clickable="false"
                                android:focusable="false"
                                android:enabled="false"
                                android:progressDrawable="@android:color/transparent"
                                android:visibility="gone" />

                        </com.google.android.material.card.MaterialCardView>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="@dimen/dimen20dp"
                            android:layout_marginBottom="@dimen/dimen20dp"
                            android:baselineAligned="false"
                            android:orientation="horizontal">

                            <LinearLayout
                                android:id="@+id/repoMetaStarsFrame"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:background="?android:attr/selectableItemBackgroundBorderless"
                                android:focusable="true"
                                android:clickable="true"
                                android:gravity="center"
                                android:orientation="vertical">

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:contentDescription="@string/repoStargazersInMenu"
                                    app:srcCompat="@drawable/ic_star_unfilled"/>

                                <TextView
                                    android:id="@+id/repoMetaStars"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen14sp"/>

                            </LinearLayout>

                            <LinearLayout
                                android:id="@+id/repoMetaPullRequestsFrame"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:background="?android:attr/selectableItemBackgroundBorderless"
                                android:focusable="true"
                                android:clickable="true"
                                android:gravity="center"
                                android:orientation="vertical">

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:contentDescription="@string/tabPullRequests"
                                    app:srcCompat="@drawable/ic_pull_request"/>

                                <TextView
                                    android:id="@+id/repoMetaPullRequests"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen14sp"/>
                            </LinearLayout>

                            <LinearLayout
                                android:id="@+id/repoMetaForksFrame"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:background="?android:attr/selectableItemBackgroundBorderless"
                                android:focusable="true"
                                android:clickable="true"
                                android:gravity="center"
                                android:orientation="vertical">

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:contentDescription="@string/infoTabRepoForksCount"
                                    app:srcCompat="@drawable/ic_fork"/>

                                <TextView
                                    android:id="@+id/repoMetaForks"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen14sp"/>

                            </LinearLayout>

                            <LinearLayout
                                android:id="@+id/repoMetaWatchersFrame"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:background="?android:attr/selectableItemBackgroundBorderless"
                                android:focusable="true"
                                android:clickable="true"
                                android:gravity="center"
                                android:orientation="vertical">

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:contentDescription="@string/repoWatchersInMenu"
                                    app:srcCompat="@drawable/ic_watchers"/>

                                <TextView
                                    android:id="@+id/repoMetaWatchers"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen14sp"/>

                            </LinearLayout>

                        </LinearLayout>

                        <LinearLayout
                            android:id="@+id/repo_fork_frame"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:background="?android:attr/selectableItemBackground"
                            android:paddingTop="@dimen/dimen8dp"
                            android:paddingBottom="@dimen/dimen8dp"
                            android:paddingStart="@dimen/dimen16dp"
                            android:paddingEnd="@dimen/dimen16dp">

                            <ImageView
                                android:layout_gravity="center"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                app:srcCompat="@drawable/ic_fork"
                                android:contentDescription="@string/generalImgContentText"/>

                            <TextView
                                android:id="@+id/repo_fork"
                                android:layout_marginStart="15dp"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:textColor="?attr/primaryTextColor"
                                android:textSize="@dimen/dimen16sp"/>

                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="@dimen/dimen12dp"
                            android:layout_marginBottom="@dimen/dimen20dp"
                            android:orientation="horizontal"
                            android:paddingStart="@dimen/dimen16dp"
                            android:paddingEnd="@dimen/dimen16dp">

                            <ImageView
                                android:layout_gravity="center"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:contentDescription="@string/repoWatchersInMenu"
                                app:srcCompat="@drawable/ic_download"/>

                            <LinearLayout
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="@dimen/dimen16dp"
                                android:gravity="center_vertical"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/infoTabRepoSize"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen16sp"/>

                                <TextView
                                    android:id="@+id/repoMetaSize"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:alpha="0.9"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen14sp"
                                    tools:text="29"/>

                            </LinearLayout>

                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="20dp"
                            android:orientation="horizontal"
                            android:paddingStart="@dimen/dimen16dp"
                            android:paddingEnd="@dimen/dimen16dp">

                            <ImageView
                                android:layout_gravity="center"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:contentDescription="@string/infoTabRepoCreatedAt"
                                app:srcCompat="@drawable/ic_calendar"/>

                            <LinearLayout
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="@dimen/dimen16dp"
                                android:gravity="center_vertical"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/infoTabRepoCreatedAt"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen16sp"/>

                                <TextView
                                    android:id="@+id/repoMetaCreatedAt"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:alpha="0.9"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen14sp"
                                    tools:text="29"/>

                            </LinearLayout>

                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="@dimen/dimen20dp"
                            android:orientation="horizontal"
                            android:paddingStart="@dimen/dimen16dp"
                            android:paddingEnd="@dimen/dimen16dp">

                            <ImageView
                                android:layout_gravity="center"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:contentDescription="@string/websiteText"
                                app:srcCompat="@drawable/ic_link"/>

                            <LinearLayout
                                android:id="@+id/websiteFrame"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="@dimen/dimen16dp"
                                android:gravity="center_vertical"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/websiteText"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen16sp"/>

                                <TextView
                                    android:id="@+id/repoMetaWebsite"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:alpha="0.9"
                                    android:autoLink="web"
                                    android:textColorLink="@color/lightBlue"
                                    android:textColor="?attr/primaryTextColor"
                                    android:textSize="@dimen/dimen14sp"
                                    tools:text="29"/>

                            </LinearLayout>

                        </LinearLayout>

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/repoAdditionalButton"
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/dimen54dp"
                            android:layout_gravity="center_horizontal"
                            android:layout_marginTop="@dimen/dimen6dp"
                            android:layout_marginBottom="@dimen/dimen20dp"
                            android:text="@string/infoShowMoreInformation"
                            android:textColor="?attr/materialCardBackgroundColor"/>

                    </LinearLayout>

                </LinearLayout>

            </com.google.android.material.card.MaterialCardView>

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/fileContentsFrameHeader"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="?attr/materialCardViewElevatedStyle"
                android:layout_marginTop="@dimen/dimen8dp"
                app:cardElevation="@dimen/dimen0dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:foreground="?android:attr/selectableItemBackground"
                    android:background="?attr/materialCardBackgroundColor"
                    android:padding="@dimen/dimen12dp"
                    android:orientation="vertical">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:minHeight="@dimen/dimen48dp"
                        android:orientation="horizontal">

                        <TextView
                            android:id="@+id/repoFilename"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:text="@string/defaultFilenameText"
                            android:textSize="@dimen/dimen16sp"
                            android:paddingTop="@dimen/dimen10dp"
                            android:layout_weight="0.9"
                            android:gravity="center_vertical"
                            android:paddingBottom="@dimen/dimen10dp"
                            android:paddingStart="@dimen/dimen0dp"
                            android:paddingEnd="@dimen/dimen0dp"
                            android:autoLink="web"
                            android:textColorLink="@color/lightBlue"
                            android:textColor="?attr/hintColor"/>

                        <ImageView
                            android:id="@+id/repoFilenameExpandCollapse"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="0.1"
                            android:layout_gravity="center_vertical|end"
                            android:background="?android:attr/selectableItemBackgroundBorderless"
                            android:contentDescription="@string/generalImgContentText"
                            app:srcCompat="@drawable/ic_chevron_up"/>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/fileContentsFrame"
                        android:orientation="vertical"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">

                        <androidx.recyclerview.widget.RecyclerView
                            android:id="@+id/repoFileContents"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:textIsSelectable="true"
                            android:textSize="@dimen/dimen16sp"
                            android:textColor="?attr/primaryTextColor"/>

                    </LinearLayout>

                </LinearLayout>

            </com.google.android.material.card.MaterialCardView>

        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

</RelativeLayout>
