GitNex/app/src/main/res/layout/fragment_repo_info.xml
opyale d72f097012 Implement multi-session notification polling and additional improvements/refactors/cleanups/fixes (#875)
Merge branch 'master' of https://codeberg.org/gitnex/GitNex into notifications-performance-improvements

 Conflicts:
	app/src/main/java/org/mian/gitnex/adapters/DraftsAdapter.java
	app/src/main/java/org/mian/gitnex/adapters/NotificationsAdapter.java
	app/src/main/java/org/mian/gitnex/adapters/UserAccountsAdapter.java
	app/src/main/java/org/mian/gitnex/adapters/UserAccountsNavAdapter.java
	app/src/main/res/layout/bottom_sheet_repository_in_list.xml
	app/src/main/res/layout/list_files.xml

Merge branch 'master' into notifications-performance-improvements

Merge branch 'master' into notifications-performance-improvements

Merge branch 'master' of https://codeberg.org/gitnex/GitNex into notifications-performance-improvements

 Conflicts:
	app/src/main/res/values-it/strings.xml

Add ripple effect to buttons.

Run syntax highlighting on separate thread. (#859)

Initial commit.

Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/875
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-Authored-By: opyale <opyale@noreply.codeberg.org>
Co-Committed-By: opyale <opyale@noreply.codeberg.org>
2021-04-13 20:56:50 +02:00

406 lines
18 KiB
XML

<?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">
<ScrollView
android:orientation="vertical"
android:background="?attr/primaryBackgroundColor"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:padding="15dp"
android:orientation="vertical"
android:id="@+id/repoInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/repoMetaFrameHeader"
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: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">
<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="5dp"
android:layout_marginBottom="8dp"
android:textColor="@color/colorWhite" />
<TextView
android:id="@+id/repoMetaName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:layout_marginBottom="5dp"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
android:id="@+id/repoMetaDescription"
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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
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="14sp" />
</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="14sp" />
</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="14sp" />
</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_unwatch" />
<TextView
android:id="@+id/repoMetaWatchers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="25dp"
android:layout_marginBottom="25dp"
android:background="?attr/dividerColor" />
<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_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="15dp"
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="16sp" />
<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="14sp"
tools:text="29" />
</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_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">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/infoTabRepoCreatedAt"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
<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="14sp"
tools:text="29" />
</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_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/websiteText"
app:srcCompat="@drawable/ic_link" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
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="16sp" />
<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="14sp"
tools:text="29" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/repoAdditionalButton"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:layout_marginBottom="20dp"
android:text="@string/infoShowMoreInformation"
android:textColor="@color/btnTextColor" />
</LinearLayout>
<LinearLayout
android:id="@+id/fileContentsFrameHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:minHeight="48dp"
android:orientation="horizontal">
<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: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">
<TextView
android:id="@+id/repoFileContents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:textSize="16sp"
android:textColor="?attr/primaryTextColor"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
app:indicatorColor="?attr/progressIndicatorColor" />
</RelativeLayout>