Increasing usability and design of files diff. (#413)
Applying sizes. Additional changes. First changes. Merge branch 'master' into diff-cleaner Fixing formatting. Merge branch 'master' into diff-cleaner Final changes for working with custom themes. Merge remote-tracking branch 'remotes/main/master' into diff-cleaner First changes for working with custom themes. Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Adding custom COLOR_FONT. Even smaller cleanups. Merge remote-tracking branch 'remotes/main/master' into diff-cleaner Small cleanups. Fixing bug and adding maximum line limit. Adding option to set cursor to end and small cleanup. First aid. Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Few improvements. Performance improvements and cleanups. Minor improvements (code in order) and many bug fixes Bug fix. Combining cited code. Adding code commenting option. Renaming list_files_diffs_new to list_files_diffs Moving ProcessBar into center Increasing performance. Applying size to all icons globally. Removing another unused file. Merge remote-tracking branch 'remotes/main/master' into diff-cleaner Removing unused files. Changing size of 'close'-button. Major changes concerning design and bug fixes. Temporary save point. 2 1 Co-authored-by: opyale <example@example.com> Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/413 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
@ -21,8 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -23,8 +23,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
@ -53,12 +53,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
<ListView
|
||||
android:id="@+id/listView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:padding="4dp"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -66,9 +65,10 @@
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@style/Base.Widget.AppCompat.ProgressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone" />
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -23,8 +23,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -23,8 +23,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/close_button_size"
|
||||
android:layout_height="@dimen/close_button_size"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -1,72 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/singleDiffView"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fileName"
|
||||
<LinearLayout
|
||||
android:id="@+id/header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="14sp"
|
||||
android:padding="5dp"
|
||||
android:background="@color/lightBlue" />
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingRight="15dp"
|
||||
android:paddingBottom="7dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fileInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="14sp"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:background="@color/lightBlue" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/fileContentsView"
|
||||
android:layout_width="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:id="@+id/headerFileName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="start"
|
||||
android:fontFamily="monospace"
|
||||
android:singleLine="true"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/allLinesLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/diff_stats"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@color/darkGreen"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@color/colorRed"
|
||||
android:orientation="horizontal" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/headerFileInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="monospace"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</HorizontalScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fileContents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/primaryBackgroundColor"
|
||||
android:textSize="14sp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="15dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:visibility="gone"
|
||||
android:background="?attr/primaryTextColor" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fileImage"
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="15dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
android:visibility="gone" />
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dividerColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/footerImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/diffLines"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"/>
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dividerColor" />
|
||||
|
||||
</LinearLayout>
|
||||
|
Reference in New Issue
Block a user