mirror of https://codeberg.org/gitnex/GitNex.git
Fix the delete button tap narrow margin
This commit is contained in:
parent
87b595b262
commit
1eedae7e3d
|
@ -8,6 +8,7 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
@ -41,7 +42,6 @@ public class MostVisitedReposAdapter
|
||||||
private final TextView repoName;
|
private final TextView repoName;
|
||||||
private final TextView orgName;
|
private final TextView orgName;
|
||||||
private final TextView mostVisited;
|
private final TextView mostVisited;
|
||||||
private final ImageView resetCounter;
|
|
||||||
|
|
||||||
private MostVisitedViewHolder(View itemView) {
|
private MostVisitedViewHolder(View itemView) {
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ public class MostVisitedReposAdapter
|
||||||
repoName = itemView.findViewById(R.id.repo_name);
|
repoName = itemView.findViewById(R.id.repo_name);
|
||||||
orgName = itemView.findViewById(R.id.org_name);
|
orgName = itemView.findViewById(R.id.org_name);
|
||||||
mostVisited = itemView.findViewById(R.id.most_visited);
|
mostVisited = itemView.findViewById(R.id.most_visited);
|
||||||
resetCounter = itemView.findViewById(R.id.reset_counter);
|
LinearLayout repoInfoEndFrame = itemView.findViewById(R.id.repo_info_end_frame);
|
||||||
|
|
||||||
itemView.setOnClickListener(
|
itemView.setOnClickListener(
|
||||||
v -> {
|
v -> {
|
||||||
|
@ -66,7 +66,7 @@ public class MostVisitedReposAdapter
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
|
|
||||||
resetCounter.setOnClickListener(
|
repoInfoEndFrame.setOnClickListener(
|
||||||
itemDelete -> {
|
itemDelete -> {
|
||||||
MaterialAlertDialogBuilder materialAlertDialogBuilder =
|
MaterialAlertDialogBuilder materialAlertDialogBuilder =
|
||||||
new MaterialAlertDialogBuilder(
|
new MaterialAlertDialogBuilder(
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
<View
|
<View
|
||||||
android:id="@+id/spacer_view"
|
android:id="@+id/spacer_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/dimen8dp" />
|
android:layout_marginBottom="@dimen/dimen8dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -71,40 +71,45 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:layout_width="@dimen/dimen18dp"
|
android:id="@+id/repo_info_counter_frame"
|
||||||
android:layout_height="@dimen/dimen18dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dimen0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/dimen6dp"
|
android:layout_weight=".90"
|
||||||
android:contentDescription="@string/generalImgContentText"
|
android:orientation="horizontal">
|
||||||
app:srcCompat="@drawable/ic_trending"
|
|
||||||
app:tint="?attr/iconsColor" />
|
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/most_visited"
|
android:layout_width="@dimen/dimen18dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="@dimen/dimen18dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dimen0dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginEnd="@dimen/dimen6dp"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:contentDescription="@string/generalImgContentText"
|
||||||
android:textSize="@dimen/dimen14sp"
|
app:srcCompat="@drawable/ic_trending"
|
||||||
tools:text="@string/repoStars" />
|
app:tint="?attr/iconsColor" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/most_visited"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="@dimen/dimen14sp"
|
||||||
|
tools:text="@string/repoStars" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/repo_info_end_frame"
|
android:id="@+id/repo_info_end_frame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dimen10dp"
|
android:layout_weight=".10"
|
||||||
android:gravity="center_vertical|end"
|
android:gravity="end"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal">
|
||||||
android:paddingStart="@dimen/dimen6dp"
|
|
||||||
android:paddingEnd="@dimen/dimen0dp">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/reset_counter"
|
android:id="@+id/reset_counter"
|
||||||
android:layout_width="@dimen/dimen18dp"
|
android:layout_width="@dimen/dimen18dp"
|
||||||
android:layout_height="@dimen/dimen18dp"
|
android:layout_height="@dimen/dimen18dp"
|
||||||
android:layout_marginStart="@dimen/dimen16dp"
|
|
||||||
android:layout_marginEnd="@dimen/dimen2dp"
|
|
||||||
android:contentDescription="@string/generalImgContentText"
|
android:contentDescription="@string/generalImgContentText"
|
||||||
app:srcCompat="@drawable/ic_delete"
|
app:srcCompat="@drawable/ic_delete"
|
||||||
app:tint="?attr/iconsColor" />
|
app:tint="?attr/iconsColor" />
|
||||||
|
|
Loading…
Reference in New Issue