mirror of
https://github.com/gitnex-org/gitnex.git
synced 2026-07-15 21:25:46 -05:00
Revamp issues UI
This commit is contained in:
@@ -13,7 +13,6 @@ import android.view.inputmethod.EditorInfo;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.adapters.ExploreIssuesAdapter;
|
||||
@@ -45,9 +44,7 @@ public class ExploreIssuesFragment extends Fragment {
|
||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
||||
}, 50));
|
||||
|
||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(requireActivity(), DividerItemDecoration.VERTICAL);
|
||||
viewBinding.recyclerViewSearchIssues.setHasFixedSize(true);
|
||||
viewBinding.recyclerViewSearchIssues.addItemDecoration(dividerItemDecoration);
|
||||
viewBinding.recyclerViewSearchIssues.setLayoutManager(new LinearLayoutManager(requireActivity()));
|
||||
|
||||
fetchDataAsync("");
|
||||
|
||||
@@ -14,7 +14,6 @@ import android.view.inputmethod.EditorInfo;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import org.gitnex.tea4j.v2.models.Issue;
|
||||
import org.mian.gitnex.R;
|
||||
@@ -87,9 +86,7 @@ public class IssuesFragment extends Fragment {
|
||||
}
|
||||
}));
|
||||
|
||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(fragmentIssuesBinding.recyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
||||
fragmentIssuesBinding.recyclerView.setHasFixedSize(true);
|
||||
fragmentIssuesBinding.recyclerView.addItemDecoration(dividerItemDecoration);
|
||||
fragmentIssuesBinding.recyclerView.setLayoutManager(new LinearLayoutManager(context));
|
||||
fragmentIssuesBinding.recyclerView.setAdapter(adapter);
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import android.view.inputmethod.EditorInfo;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.activities.MainActivity;
|
||||
@@ -44,9 +43,6 @@ public class MyIssuesFragment extends Fragment {
|
||||
|
||||
fragmentIssuesBinding.recyclerView.setHasFixedSize(true);
|
||||
fragmentIssuesBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(fragmentIssuesBinding.recyclerView.getContext(),
|
||||
DividerItemDecoration.VERTICAL);
|
||||
fragmentIssuesBinding.recyclerView.addItemDecoration(dividerItemDecoration);
|
||||
|
||||
((MainActivity) requireActivity()).setFragmentRefreshListenerMyIssues(myIssues -> {
|
||||
|
||||
|
||||
@@ -6,19 +6,25 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".activities.RepoDetailActivity">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/pullToRefresh"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:padding="@dimen/dimen8dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/pullToRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:scrollbars="vertical" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
|
||||
@@ -25,18 +25,25 @@
|
||||
android:textSize="20sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/pullToRefresh"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:padding="@dimen/dimen8dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerViewSearchIssues"
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/pullToRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:scrollbars="vertical" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerViewSearchIssues"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -5,64 +5,101 @@
|
||||
android:id="@+id/relativeLayoutFrameIssuesList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:focusable="true">
|
||||
android:paddingTop="@dimen/dimen4dp"
|
||||
android:paddingBottom="@dimen/dimen4dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/infoSection"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/assigneeAvatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
app:cardElevation="@dimen/dimen0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/titleLabelsSection"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/materialCardBackgroundColor"
|
||||
android:padding="@dimen/dimen12dp"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/issueTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top|center_vertical"
|
||||
android:text="@string/newIssueTitle"
|
||||
android:textAlignment="gravity"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="16sp"
|
||||
tools:text="Id illum odio repellat omnis fuga deserunt aut. Ut est aut similique qui incidunt quia et." />
|
||||
<LinearLayout
|
||||
android:id="@+id/infoSection"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="UseCompoundDrawables">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/labelsScrollViewDots"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:foregroundGravity="right"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:scrollbarThumbHorizontal="@android:color/transparent"
|
||||
android:visibility="gone"
|
||||
android:fillViewport="true">
|
||||
<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/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/assigneeAvatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/frameLabelsDots"
|
||||
android:id="@+id/titleLabelsSection"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/issueTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top|center_vertical"
|
||||
android:text="@string/newIssueTitle"
|
||||
android:textAlignment="gravity"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="16sp"
|
||||
tools:text="Id illum odio repellat omnis fuga deserunt aut. Ut est aut similique qui incidunt quia et." />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/labelsScrollViewDots"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:foregroundGravity="right"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:scrollbarThumbHorizontal="@android:color/transparent"
|
||||
android:visibility="gone"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/frameLabelsDots"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/labelsScrollViewWithText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:foregroundGravity="right"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:scrollbarThumbHorizontal="@android:color/transparent"
|
||||
android:visibility="gone"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/frameLabels"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
@@ -70,30 +107,7 @@
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/labelsScrollViewWithText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:foregroundGravity="right"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:scrollbarThumbHorizontal="@android:color/transparent"
|
||||
android:visibility="gone"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/frameLabels"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/issueInfoFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -146,4 +160,8 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<item name="colorSecondary">@color/lightThemeTextColor</item>
|
||||
<item name="colorOnSurfaceVariant">@color/lightThemeTextColor</item>
|
||||
<item name="colorSecondaryContainer">@color/lightThemeColorSecondaryContainer</item>
|
||||
<item name="materialCardBackgroundColor">@color/lightThemeCardBackground</item>
|
||||
|
||||
<item name="diffAddedColor">@color/lightThemeDiffAddedColor</item>
|
||||
<item name="diffRemovedColor">@color/lightThemeDiffRemovedColor</item>
|
||||
@@ -57,6 +58,7 @@
|
||||
<item name="colorPrimary">@color/retroThemeColorPrimary</item>
|
||||
<item name="colorSecondary">@color/retroThemeColorSecondary</item>
|
||||
<item name="colorOnSurfaceVariant">@color/retroThemeTextColor</item>
|
||||
<item name="materialCardBackgroundColor">@color/retroThemeCardBackground</item>
|
||||
|
||||
<item name="diffAddedColor">@color/retroThemeDiffAddedColor</item>
|
||||
<item name="diffRemovedColor">@color/retroThemeDiffRemovedColor</item>
|
||||
|
||||
@@ -15,5 +15,6 @@
|
||||
<attr name="fabColor" format="reference" />
|
||||
<attr name="iconsColor" format="reference" />
|
||||
<attr name="pagerTabIndicatorColor" format="reference" />
|
||||
<attr name="materialCardBackgroundColor" format="reference" />
|
||||
<attr name="isDark" format="integer" />
|
||||
</resources>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#212121</color>
|
||||
<color name="colorPrimaryDark">#212121</color>
|
||||
<color name="colorPrimary">#1f2926</color>
|
||||
<color name="colorPrimaryDark">#1f2926</color>
|
||||
<color name="colorAccent">#7f7e7b</color>
|
||||
<color name="hintColor">#7f7e7b</color>
|
||||
<color name="colorWhite">#ffffff</color>
|
||||
@@ -28,30 +28,33 @@
|
||||
<color name="dividerColorDark">#1d1d1d</color>
|
||||
<color name="lightYellow">#efd34a</color>
|
||||
<color name="warningColor">#dbb109</color>
|
||||
<color name="colorSecondaryContainer">#1f2926</color>
|
||||
<color name="colorSecondaryContainer">#1e2221</color>
|
||||
<color name="cardBackground">#1e2221</color>
|
||||
|
||||
<color name="lightThemeDiffRemovedColor">#FCEDED</color>
|
||||
<color name="lightThemeDiffAddedColor">#EAF8ED</color>
|
||||
<color name="lightThemeDiffSelectedColor">#e0e0e0</color>
|
||||
<color name="lightThemeTextColor">#646565</color>
|
||||
<color name="lightThemeBackground">#f9f9f9</color>
|
||||
<color name="lightThemeBackground">#e5eae8</color>
|
||||
<color name="lightThemeInputBackground">#EFEFEF</color>
|
||||
<color name="lightThemInputSelected">#C9CCCC</color>
|
||||
<color name="lightThemeInputTextColor">#212121</color>
|
||||
<color name="lightThemeDividerColor">#dbdbdb</color>
|
||||
<color name="lightThemeColorSecondaryContainer">#dbe3e1</color>
|
||||
<color name="lightThemeCardBackground">#ffffff</color>
|
||||
|
||||
<color name="retroThemeDiffRemovedColor">#fad6d6</color>
|
||||
<color name="retroThemeDiffAddedColor">#d0f7d9</color>
|
||||
<color name="retroThemeDiffSelectedColor">#d8d8d8</color>
|
||||
<color name="retroThemeTextColor">#212f3c</color>
|
||||
<color name="retroThemeBackground">#fcfcfc</color>
|
||||
<color name="retroThemeBackground">#eae5f1</color>
|
||||
<color name="retroThemeInputBackground">#f2f2f2</color>
|
||||
<color name="retroThemeInputSelected">#D3D3D3</color>
|
||||
<color name="retroThemeInputTextColor">#6200EE</color>
|
||||
<color name="retroThemeDividerColor">#dbdbdb</color>
|
||||
<color name="retroThemeColorPrimary">#6200EE</color>
|
||||
<color name="retroThemeColorSecondary">#03DAC6</color>
|
||||
<color name="retroThemeCardBackground">#ffffff</color>
|
||||
|
||||
<color name="iconPrMergedColor">#a333c8</color>
|
||||
<color name="iconIssuePrClosedColor">#db2828</color>
|
||||
@@ -60,6 +63,8 @@
|
||||
<color name="pitchBlackThemeTextColor">#d2d2d2</color>
|
||||
<color name="pitchBlackThemeDividerColor">#0E0E0E</color>
|
||||
<color name="pitchBlackThemeGeneralBackgroundColor">#151515</color>
|
||||
<color name="pitchBlackThemeColorSecondary">#050505</color>
|
||||
<color name="pitchBlackThemeCardBackground">#0C0C0C</color>
|
||||
|
||||
<!-- code editor colors -->
|
||||
<color name="five_dark_black">#252526</color>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<item name="colorSecondary">@color/colorWhite</item>
|
||||
<item name="colorOnSurfaceVariant">@color/colorWhite</item>
|
||||
<item name="colorSecondaryContainer">@color/colorSecondaryContainer</item>
|
||||
<item name="materialCardBackgroundColor">@color/cardBackground</item>
|
||||
|
||||
<item name="diffAddedColor">@color/diffAddedColor</item>
|
||||
<item name="diffRemovedColor">@color/diffRemovedColor</item>
|
||||
@@ -58,6 +59,7 @@
|
||||
<item name="colorSecondary">@color/lightThemeTextColor</item>
|
||||
<item name="colorOnSurfaceVariant">@color/lightThemeTextColor</item>
|
||||
<item name="colorSecondaryContainer">@color/lightThemeColorSecondaryContainer</item>
|
||||
<item name="materialCardBackgroundColor">@color/lightThemeCardBackground</item>
|
||||
|
||||
<item name="diffAddedColor">@color/lightThemeDiffAddedColor</item>
|
||||
<item name="diffRemovedColor">@color/lightThemeDiffRemovedColor</item>
|
||||
@@ -102,6 +104,7 @@
|
||||
<item name="colorPrimary">@color/retroThemeColorPrimary</item>
|
||||
<item name="colorSecondary">@color/retroThemeColorSecondary</item>
|
||||
<item name="colorOnSurfaceVariant">@color/retroThemeTextColor</item>
|
||||
<item name="materialCardBackgroundColor">@color/retroThemeCardBackground</item>
|
||||
|
||||
<item name="diffAddedColor">@color/retroThemeDiffAddedColor</item>
|
||||
<item name="diffRemovedColor">@color/retroThemeDiffRemovedColor</item>
|
||||
@@ -147,6 +150,7 @@
|
||||
<item name="colorSecondary">@color/pitchBlackThemeTextColor</item>
|
||||
<item name="colorOnSurfaceVariant">@color/pitchBlackThemeTextColor</item>
|
||||
<item name="colorSecondaryContainer">@color/colorSecondaryContainer</item>
|
||||
<item name="materialCardBackgroundColor">@color/pitchBlackThemeCardBackground</item>
|
||||
|
||||
<item name="diffAddedColor">@color/diffAddedColor</item>
|
||||
<item name="diffRemovedColor">@color/diffRemovedColor</item>
|
||||
|
||||
Reference in New Issue
Block a user