mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2023-12-13 20:50:18 +01:00
224ead33bf
### Describe what your pull request does and which issue you’re targeting
This PR fixes the problem that you can't go back from the "About" section in the settings and it changes the action bar behaviour of the about fragment to keep the design consistent (see below).
The activity action bar is hidden [here](82ffeefdc4/app/src/main/java/org/mian/gitnex/fragments/AboutFragment.java (L35)
), as the about fragment uses it's own (in my implementation) to keep the design consistent (currently, all sections of the settings are own activitys and their action bar has a close button, except the about section). If you don't like this, I can remove it, but currently, it doesn't look nice integrated.
Closes #905
- [X] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md).
- [X] I'm following the code standards as defined [here](https://codeberg.org/gitnex/GitNex/wiki/Code-Standards).
- [X] By submitting this pull request, I permit GitNex to license my work under the [GNU General Public License v3](https://codeberg.org/GitNex/GitNex/src/branch/main/LICENSE).
Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/908
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
265 lines
10 KiB
XML
265 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent" >
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:id="@+id/appbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="10dp"
|
|
android:theme="@style/Widget.AppCompat.SearchView">
|
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
|
android:id="@+id/toolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="?attr/primaryBackgroundColor">
|
|
|
|
<ImageView
|
|
android:id="@+id/close"
|
|
android:layout_width="@dimen/close_button_size"
|
|
android:layout_height="@dimen/close_button_size"
|
|
android:layout_marginLeft="15dp"
|
|
android:layout_marginRight="15dp"
|
|
android:contentDescription="@string/close"
|
|
android:gravity="center_vertical"
|
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
android:focusable="true"
|
|
android:clickable="true"
|
|
android:src="@drawable/ic_close" />
|
|
|
|
<TextView
|
|
android:id="@+id/toolbar_title"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:maxLines="1"
|
|
android:text="@string/pageTitleAbout"
|
|
android:textColor="?attr/primaryTextColor"
|
|
android:textSize="20sp" />
|
|
|
|
</com.google.android.material.appbar.MaterialToolbar>
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="?attr/primaryBackgroundColor">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:fitsSystemWindows="true"
|
|
android:gravity="start"
|
|
android:layout_marginStart="20dp"
|
|
android:layout_marginEnd="20dp"
|
|
android:layout_marginTop="50dp"
|
|
android:id="@+id/aboutFrame">
|
|
|
|
<ImageView
|
|
android:layout_width="80dp"
|
|
android:layout_height="80dp"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginTop="20dp"
|
|
android:baselineAligned="false"
|
|
android:contentDescription="@string/appName"
|
|
android:src="@mipmap/app_logo" />
|
|
|
|
<TextView
|
|
android:id="@+id/appName"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/appName"
|
|
android:textIsSelectable="true"
|
|
android:layout_marginTop="5dp"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:textColor="?attr/primaryTextColor"
|
|
android:layout_gravity="center_horizontal" />
|
|
|
|
<!-- version -->
|
|
<TextView
|
|
android:id="@+id/appVersionHeader"
|
|
android:text="@string/appVersion"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="40dp"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:id="@+id/dividerVersion"
|
|
android:background="?attr/dividerColor"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/appVersion"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textIsSelectable="true"
|
|
android:textSize="14sp"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
<!-- version -->
|
|
|
|
<!-- build -->
|
|
<TextView
|
|
android:id="@+id/appBuildHeader"
|
|
android:text="@string/appBuild"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="24dp"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:id="@+id/dividerBuild"
|
|
android:background="?attr/dividerColor"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/appBuild"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textIsSelectable="true"
|
|
android:textSize="14sp"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
<!-- build -->
|
|
|
|
<!-- user server version -->
|
|
<TextView
|
|
android:id="@+id/userServerVersionHeader"
|
|
android:text="@string/commitPage"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="24dp"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:id="@+id/dividerUserServerVersion"
|
|
android:background="?attr/dividerColor"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/userServerVersion"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textIsSelectable="true"
|
|
android:textSize="14sp"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
<!-- user server version -->
|
|
|
|
<!-- support -->
|
|
<TextView
|
|
android:id="@+id/supportHeader"
|
|
android:text="@string/supportText"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="24dp"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:id="@+id/dividerSupport"
|
|
android:background="?attr/dividerColor"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/donationLinkPatreon"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/supportTextPatreon"
|
|
android:textColor="@color/lightBlue"
|
|
android:textSize="14sp"
|
|
android:autoLink="web"
|
|
android:textColorLink="@color/lightBlue" />
|
|
<!-- support -->
|
|
|
|
<!-- translate -->
|
|
<TextView
|
|
android:id="@+id/translateHeader"
|
|
android:text="@string/translateText"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="24dp"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:id="@+id/dividerTranslate"
|
|
android:background="?attr/dividerColor"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/translateLink"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:autoLink="web"
|
|
android:gravity="start"
|
|
android:text="@string/translateWithCrowdin"
|
|
android:textColor="@color/lightBlue"
|
|
android:textColorLink="@color/lightBlue"
|
|
android:textSize="14sp"
|
|
android:visibility="visible" />
|
|
<!-- translate -->
|
|
|
|
<!-- website -->
|
|
<TextView
|
|
android:id="@+id/websiteHeader"
|
|
android:text="@string/websiteText"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="24dp"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="?attr/primaryTextColor" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:id="@+id/dividerWebsite"
|
|
android:background="?attr/dividerColor"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/appWebsite"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/appWebsiteLink"
|
|
android:textColor="@color/lightBlue"
|
|
android:textSize="14sp"
|
|
android:autoLink="web"
|
|
android:layout_marginBottom="24dp"
|
|
android:textColorLink="@color/lightBlue" />
|
|
<!-- website -->
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
</RelativeLayout>
|