2019-06-03 23:25:05 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2020-08-08 17:43:14 +02:00
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
2019-06-03 23:25:05 +02:00
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
|
android:id="@+id/main_content"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2020-03-04 20:37:28 +01:00
|
|
|
android:background="?attr/primaryBackgroundColor"
|
2022-08-15 16:26:02 +02:00
|
|
|
android:fitsSystemWindows="true"
|
2019-06-03 23:25:05 +02:00
|
|
|
tools:context=".activities.RepoDetailActivity">
|
|
|
|
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
|
|
android:id="@+id/appbar"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2022-08-15 16:26:02 +02:00
|
|
|
android:theme="@style/Widget.AppCompat.SearchView"
|
|
|
|
app:elevation="@dimen/dimen0dp">
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2020-08-08 17:43:14 +02:00
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
2019-06-03 23:25:05 +02:00
|
|
|
android:id="@+id/toolbar"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="?attr/actionBarSize"
|
|
|
|
android:layout_weight="1"
|
2020-08-08 17:43:14 +02:00
|
|
|
android:background="?attr/primaryBackgroundColor">
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2021-04-10 20:29:21 +02:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/repoTypeToolbar"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:contentDescription="@string/generalImgContentText"
|
2022-08-07 21:34:02 +02:00
|
|
|
android:paddingStart="@dimen/dimen0dp"
|
|
|
|
android:paddingEnd="@dimen/dimen8dp"
|
2021-04-10 20:29:21 +02:00
|
|
|
android:src="@drawable/ic_lock"
|
|
|
|
android:visibility="gone"
|
2022-08-15 16:26:02 +02:00
|
|
|
tools:visibility="visible"/>
|
2021-04-10 20:29:21 +02:00
|
|
|
|
2020-01-02 08:51:10 +01:00
|
|
|
<TextView
|
2022-08-15 16:26:02 +02:00
|
|
|
android:id="@+id/toolbar_title"
|
2020-01-02 08:51:10 +01:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:gravity="center_vertical"
|
2020-03-04 20:37:28 +01:00
|
|
|
android:textColor="?attr/primaryTextColor"
|
2022-08-15 16:26:02 +02:00
|
|
|
android:textSize="@dimen/dimen20sp"/>
|
2020-01-02 08:51:10 +01:00
|
|
|
|
2020-08-08 17:43:14 +02:00
|
|
|
</com.google.android.material.appbar.MaterialToolbar>
|
2019-06-03 23:25:05 +02:00
|
|
|
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
|
|
|
android:id="@+id/loadingIndicator"
|
|
|
|
android:layout_width="match_parent"
|
2022-08-15 16:26:02 +02:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:indeterminate="true"/>
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
|
2019-06-03 23:25:05 +02:00
|
|
|
<com.google.android.material.tabs.TabLayout
|
|
|
|
android:id="@+id/tabs"
|
|
|
|
android:layout_width="match_parent"
|
2022-08-15 16:26:02 +02:00
|
|
|
android:layout_height="wrap_content"
|
2020-03-04 20:37:28 +01:00
|
|
|
android:background="?attr/primaryBackgroundColor"
|
2020-08-20 18:21:55 +02:00
|
|
|
app:tabIndicatorColor="?attr/pagerTabIndicatorColor"
|
2023-09-20 17:30:21 +02:00
|
|
|
app:tabIndicatorFullWidth="true"
|
|
|
|
app:tabMode="auto"
|
|
|
|
app:tabIndicatorHeight="@dimen/dimen4dp"
|
2022-08-15 16:26:02 +02:00
|
|
|
app:tabTextAppearance="@style/customTabLayout"
|
|
|
|
app:tabTextColor="?attr/primaryTextColor">
|
2019-06-03 23:25:05 +02:00
|
|
|
|
|
|
|
</com.google.android.material.tabs.TabLayout>
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
|
2022-06-26 09:16:35 +02:00
|
|
|
<androidx.viewpager2.widget.ViewPager2
|
|
|
|
android:id="@+id/repositoryContainer"
|
2019-06-03 23:25:05 +02:00
|
|
|
android:layout_width="match_parent"
|
2022-06-26 09:16:35 +02:00
|
|
|
android:layout_height="match_parent"
|
2022-08-15 16:26:02 +02:00
|
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2020-08-04 22:50:04 +02:00
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|