Repo info, commits and files revamp

This commit is contained in:
M M Arif 2022-08-13 13:06:17 +05:00
parent a3af7353ba
commit e541f0b0b1
7 changed files with 530 additions and 451 deletions

View File

@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<corners android:radius="3dp"/>
<corners android:radius="@dimen/dimen8dp"/>
<solid android:color="@color/releasePre" />
</shape>

View File

@ -52,15 +52,21 @@
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/pullToRefresh"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen56dp">
android:layout_marginTop="@dimen/dimen56dp"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBackgroundColor"
android:scrollbars="vertical"/>
android:padding="@dimen/dimen8dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@ -12,7 +12,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Widget.AppCompat.SearchView"
app:elevation="0dp"
app:elevation="@dimen/dimen0dp"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.appbar.MaterialToolbar
@ -39,12 +39,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="20dp"
android:layout_marginEnd="@dimen/dimen20dp"
android:ellipsize="none"
android:scrollbars="horizontal"
android:singleLine="true"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp"/>
android:textSize="@dimen/dimen18sp"/>
</com.google.android.material.appbar.MaterialToolbar>
@ -65,108 +65,109 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="?attr/primaryBackgroundColor">
android:padding="@dimen/dimen8dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/linearLayoutFrame"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:orientation="vertical"
android:background="?attr/primaryBackgroundColor">
<TextView
android:id="@+id/commitSubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp"
tools:text="This is a test" />
<TextView
android:id="@+id/commitBody"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:alpha=".8"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp"
tools:text="This is a test commit message" />
style="?attr/materialCardViewFilledStyle"
android:layout_marginBottom="@dimen/dimen4dp"
app:cardElevation="@dimen/dimen0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">
android:foreground="?android:attr/selectableItemBackground"
android:background="?attr/materialCardBackgroundColor"
android:padding="@dimen/dimen12dp"
android:orientation="vertical">
<LinearLayout
<TextView
android:id="@+id/commitSubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginBottom="@dimen/dimen8dp"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen18sp"
tools:text="This is a test" />
<TextView
android:id="@+id/commitBody"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dimen8dp"
android:alpha=".8"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen14sp"
tools:text="This is a test commit message" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen6dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
android:orientation="horizontal">
<ImageView
android:id="@+id/commitAuthorAvatar"
android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText"
tools:srcCompat="@tools:sample/avatars" />
<ImageView
android:id="@+id/commitCommitterAvatar"
android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/commitAuthorAndCommitter"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:textSize="12sp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/commitAuthorAvatar"
android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText"
tools:srcCompat="@tools:sample/avatars" />
<ImageView
android:id="@+id/commitCommitterAvatar"
android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/commitAuthorAndCommitter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dimen10dp"
android:textSize="@dimen/dimen12sp"
android:textColor="?attr/primaryTextColor"
tools:text="opyale authored and opyale committed" />
</LinearLayout>
<TextView
android:id="@+id/commitSha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:alpha=".8"
android:drawablePadding="@dimen/dimen10dp"
android:textSize="@dimen/dimen12sp"
android:layout_marginStart="@dimen/dimen10dp"
android:gravity="center_vertical"
android:textColor="?attr/primaryTextColor"
tools:text="opyale authored and opyale committed" />
app:drawableLeftCompat="@drawable/ic_commit"
tools:text="357f3qd5s" />
</LinearLayout>
<TextView
android:id="@+id/commitSha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:alpha=".8"
android:drawablePadding="10dp"
android:textSize="12sp"
android:layout_marginStart="10dp"
android:gravity="center_vertical"
android:textColor="?attr/primaryTextColor"
app:drawableLeftCompat="@drawable/ic_commit"
tools:text="357f3qd5s" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dividerColor" />
</com.google.android.material.card.MaterialCardView>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/diff_files"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:headerDividersEnabled="true"
android:nestedScrollingEnabled="false"
android:background="?attr/primaryBackgroundColor"
tools:listitem="@layout/list_diff_files"/>
</LinearLayout>

View File

@ -23,17 +23,23 @@
android:ellipsize="none"
android:scrollbars="horizontal"
android:singleLine="true"
android:layout_marginStart="20dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:textSize="15sp"
android:layout_marginStart="@dimen/dimen20dp"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen8dp"
android:textSize="@dimen/dimen16sp"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/diff_files"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBackgroundColor"
android:scrollbars="vertical" />
android:padding="@dimen/dimen8dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/diff_files"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>

View File

@ -12,7 +12,7 @@
android:layout_height="match_parent">
<LinearLayout
android:padding="15dp"
android:padding="@dimen/dimen8dp"
android:orientation="vertical"
android:id="@+id/repoInfoLayout"
android:layout_width="match_parent"
@ -26,113 +26,117 @@
android:layout_gravity="center"
android:text="@string/archivedRepositoryMessage"
android:background="@drawable/shape_archived"
android:padding="6dp"
android:layout_marginBottom="8dp"
android:padding="@dimen/dimen6dp"
android:layout_marginBottom="@dimen/dimen8dp"
android:textColor="@color/colorWhite" />
<LinearLayout
android:id="@+id/repoMetaFrameHeader"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:minHeight="48dp"
android:orientation="horizontal">
<TextView
android:id="@+id/repoMetaData"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/repoMetaData"
android:textSize="16sp"
android:paddingTop="10dp"
android:layout_weight="0.9"
android:gravity="center_vertical"
android:paddingBottom="10dp"
android:paddingStart="0dp"
android:paddingEnd="0dp"
android:textColor="@color/lightGray"/>
<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/issueDescriptionEmpty"
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">
style="?attr/materialCardViewFilledStyle"
app:cardElevation="@dimen/dimen0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:foreground="?android:attr/selectableItemBackground"
android:background="?attr/materialCardBackgroundColor"
android:padding="@dimen/dimen12dp"
android:orientation="vertical">
<TextView
android:id="@+id/repoMetaOwner"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/repoMetaFrameHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="22sp"
android:textStyle="bold"/>
android:gravity="center"
android:minHeight="@dimen/dimen48dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:layout_marginBottom="5dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:text="/"
android:textSize="22sp"
android:textStyle="bold"
tools:ignore="HardcodedText"/>
<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="@color/lightGray"/>
<TextView
android:id="@+id/repoMetaName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:layout_marginBottom="5dp"
android:textSize="22sp"
android:textStyle="bold" />
<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>
<TextView
android:id="@+id/repoMetaDescription"
<LinearLayout
android:id="@+id/repoMetaFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:autoLink="web"
android:ellipsize="end"
android:maxLines="3"
android:textColor="?attr/primaryTextColor"
android:textColorLink="@color/lightBlue"
android:textSize="16sp" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/fragmentProfileCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:strokeWidth="@dimen/dimen0dp"
android:layout_marginTop="@dimen/dimen12dp"
android:layout_marginBottom="@dimen/dimen12dp"
app:cardBackgroundColor="?attr/materialCardBackgroundColor"
style="@style/CustomMaterialCardStyle">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen12dp"
android:layout_marginBottom="@dimen/dimen12dp"
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" />
<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">
@ -158,7 +162,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
<LinearLayout
@ -183,7 +188,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
<LinearLayout
@ -208,7 +213,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
<LinearLayout
@ -233,230 +239,256 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<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="8dp"
android:paddingBottom="8dp"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<ImageView
android:layout_gravity="center"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/repo_fork_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_fork"
android:contentDescription="@string/generalImgContentText" />
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
android:paddingTop="@dimen/dimen8dp"
android:paddingBottom="@dimen/dimen8dp"
android:paddingStart="@dimen/dimen16dp"
android:paddingEnd="@dimen/dimen16dp">
<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="16sp" />
</LinearLayout>
<ImageView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_fork"
android:contentDescription="@string/generalImgContentText" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="20dp"
android:orientation="horizontal"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<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" />
<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>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:gravity="center_vertical"
android:orientation="vertical">
android:layout_marginTop="@dimen/dimen12dp"
android:layout_marginBottom="@dimen/dimen20dp"
android:orientation="horizontal"
android:paddingStart="@dimen/dimen16dp"
android:paddingEnd="@dimen/dimen16dp">
<TextView
<ImageView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/infoTabRepoSize"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
android:contentDescription="@string/repoWatchersInMenu"
app:srcCompat="@drawable/ic_download" />
<TextView
android:id="@+id/repoMetaSize"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.9"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp"
tools:text="29" />
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>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:orientation="horizontal"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<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="15dp"
android:gravity="center_vertical"
android:orientation="vertical">
android:layout_marginBottom="20dp"
android:orientation="horizontal"
android:paddingStart="@dimen/dimen16dp"
android:paddingEnd="@dimen/dimen16dp">
<TextView
<ImageView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/infoTabRepoCreatedAt"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
android:contentDescription="@string/infoTabRepoCreatedAt"
app:srcCompat="@drawable/ic_calendar" />
<TextView
android:id="@+id/repoMetaCreatedAt"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.9"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp"
tools:text="29" />
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>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:orientation="horizontal"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<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="15dp"
android:gravity="center_vertical"
android:orientation="vertical">
android:layout_marginBottom="@dimen/dimen20dp"
android:orientation="horizontal"
android:paddingStart="@dimen/dimen16dp"
android:paddingEnd="@dimen/dimen16dp">
<TextView
<ImageView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/websiteText"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
android:contentDescription="@string/websiteText"
app:srcCompat="@drawable/ic_link" />
<TextView
android:id="@+id/repoMetaWebsite"
<LinearLayout
android:id="@+id/websiteFrame"
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="14sp"
tools:text="29" />
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="@color/btnTextColor" />
</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="@color/btnTextColor" />
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<LinearLayout
android:id="@+id/fileContentsFrameHeader"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:minHeight="48dp"
android:orientation="horizontal">
style="?attr/materialCardViewFilledStyle"
android:layout_marginTop="@dimen/dimen8dp"
app:cardElevation="@dimen/dimen0dp">
<TextView
android:id="@+id/repoFilename"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/defaultFilenameText"
android:textSize="16sp"
android:paddingTop="10dp"
android:layout_weight="0.9"
android:gravity="center_vertical"
android:paddingBottom="10dp"
android:paddingStart="0dp"
android:paddingEnd="0dp"
android:autoLink="web"
android:textColorLink="@color/lightBlue"
android:textColor="@color/lightGray"/>
<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/issueDescriptionEmpty"
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"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:textSize="16sp"
android:textColor="?attr/primaryTextColor"/>
android:foreground="?android:attr/selectableItemBackground"
android:background="?attr/materialCardBackgroundColor"
android:padding="@dimen/dimen12dp"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/fileContentsFrameHeader"
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="@color/lightGray"/>
<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>

View File

@ -4,87 +4,103 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:paddingTop="@dimen/dimen4dp"
android:paddingBottom="@dimen/dimen4dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/linearLayoutFrame"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:orientation="vertical">
<TextView
android:id="@+id/commitSubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp"
tools:text="This is a test" />
style="?attr/materialCardViewFilledStyle"
app:cardElevation="@dimen/dimen0dp">
<LinearLayout
android:id="@+id/linearLayoutFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">
android:foreground="?android:attr/selectableItemBackground"
android:background="?attr/materialCardBackgroundColor"
android:padding="@dimen/dimen12dp"
android:orientation="vertical">
<LinearLayout
<TextView
android:id="@+id/commitSubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginBottom="@dimen/dimen8dp"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen18sp"
tools:text="This is a test" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen6dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
android:orientation="horizontal">
<ImageView
android:id="@+id/commitAuthorAvatar"
android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp"
android:contentDescription="@string/generalImgContentText"
android:layout_marginEnd="5dp"
tools:srcCompat="@tools:sample/avatars" />
<ImageView
android:id="@+id/commitCommitterAvatar"
android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/commitAuthorAndCommitter"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:textSize="12sp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<com.google.android.material.card.MaterialCardView
android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp"
style="?attr/materialCardViewFilledStyle"
app:cardElevation="@dimen/dimen0dp"
android:layout_marginEnd="@dimen/dimen6dp"
app:cardCornerRadius="@dimen/dimen12dp">
<ImageView
android:id="@+id/commitAuthorAvatar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/generalImgContentText"
tools:srcCompat="@tools:sample/avatars" />
</com.google.android.material.card.MaterialCardView>
<ImageView
android:id="@+id/commitCommitterAvatar"
android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/commitAuthorAndCommitter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dimen10dp"
android:textSize="@dimen/dimen12sp"
android:textColor="?attr/primaryTextColor"
tools:text="opyale authored and opyale committed" />
</LinearLayout>
<TextView
android:id="@+id/commitSha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginStart="@dimen/dimen10dp"
android:alpha=".8"
android:drawablePadding="@dimen/dimen10dp"
android:gravity="center_vertical"
android:textColor="?attr/primaryTextColor"
tools:text="opyale authored and opyale committed" />
android:textSize="@dimen/dimen12sp"
app:drawableLeftCompat="@drawable/ic_commit"
tools:text="357f3qd5s" />
</LinearLayout>
<TextView
android:id="@+id/commitSha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginStart="10dp"
android:alpha=".8"
android:drawablePadding="10dp"
android:gravity="center_vertical"
android:textColor="?attr/primaryTextColor"
android:textSize="12sp"
app:drawableLeftCompat="@drawable/ic_commit"
tools:text="357f3qd5s" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dividerColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout>

View File

@ -5,49 +5,67 @@
android:id="@+id/main_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
android:paddingTop="@dimen/dimen4dp"
android:paddingBottom="@dimen/dimen4dp">
<ImageView
android:layout_width="wrap_content"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/generalImgContentText"
app:srcCompat="@drawable/ic_diff" />
style="?attr/materialCardViewFilledStyle"
app:cardElevation="@dimen/dimen0dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/fileName"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="start"
android:singleLine="true"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
tools:text="/src/test1/test2/test3/test4/test.txt" />
android:foreground="?android:attr/selectableItemBackground"
android:background="?attr/materialCardBackgroundColor"
android:padding="@dimen/dimen12dp"
android:orientation="horizontal">
<TextView
android:id="@+id/fileStatistics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="13sp"
tools:text="@string/diffStatistics" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/generalImgContentText"
app:srcCompat="@drawable/ic_diff" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen10dp"
android:layout_marginEnd="@dimen/dimen10dp"
android:layout_weight="1"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_chevron_right"
android:contentDescription="@string/generalImgContentText" />
<TextView
android:id="@+id/fileName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="start"
android:singleLine="true"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen16sp"
tools:text="/src/test1/test2/test3/test4/test.txt" />
<TextView
android:id="@+id/fileStatistics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen12sp"
tools:text="@string/diffStatistics" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_chevron_right"
android:contentDescription="@string/generalImgContentText" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>