mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2023-12-13 20:50:18 +01:00
labels list ui revamp
This commit is contained in:
parent
83b3e84b81
commit
cfa0a72dc9
|
@ -11,7 +11,6 @@ import android.widget.TextView;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
@ -63,10 +62,6 @@ public class LabelsFragment extends Fragment {
|
|||
mRecyclerView.setHasFixedSize(true);
|
||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
|
||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(),
|
||||
DividerItemDecoration.VERTICAL);
|
||||
mRecyclerView.addItemDecoration(dividerItemDecoration);
|
||||
|
||||
mProgressBar = fragmentLabelsBinding.progressBar;
|
||||
|
||||
swipeRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -6,63 +6,82 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
android:paddingTop="@dimen/dimen4dp"
|
||||
android:paddingBottom="@dimen/dimen4dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/labelView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
app:cardCornerRadius="@dimen/dimen16dp"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
app:contentPaddingBottom="@dimen/dimen4dp"
|
||||
app:contentPaddingLeft="@dimen/dimen12dp"
|
||||
app:contentPaddingRight="@dimen/dimen12dp"
|
||||
app:contentPaddingTop="@dimen/dimen4dp">
|
||||
app:cardElevation="@dimen/dimen0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/materialCardBackgroundColor"
|
||||
android:padding="@dimen/dimen12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/labelIcon"
|
||||
android:layout_width="@dimen/dimen16dp"
|
||||
android:layout_height="@dimen/dimen16dp"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:layout_marginBottom="@dimen/dimen4dp"
|
||||
android:layout_weight="0"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
app:tint="@color/colorWhite"
|
||||
app:srcCompat="@drawable/ic_label" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/labelName"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/labelView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen8dp"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold" />
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
app:cardCornerRadius="@dimen/dimen16dp"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
app:contentPaddingBottom="@dimen/dimen4dp"
|
||||
app:contentPaddingLeft="@dimen/dimen12dp"
|
||||
app:contentPaddingRight="@dimen/dimen12dp"
|
||||
app:contentPaddingTop="@dimen/dimen4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/labelIcon"
|
||||
android:layout_width="@dimen/dimen16dp"
|
||||
android:layout_height="@dimen/dimen16dp"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:layout_marginBottom="@dimen/dimen4dp"
|
||||
android:layout_weight="0"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
app:tint="@color/colorWhite"
|
||||
app:srcCompat="@drawable/ic_label" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/labelName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen8dp"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.legacy.widget.Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/labelsOptionsMenu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:contentDescription="@string/labelMenuContentDesc"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_dotted_menu_horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.legacy.widget.Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/labelsOptionsMenu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:contentDescription="@string/labelMenuContentDesc"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_dotted_menu_horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
Loading…
Reference in a new issue