Skip to content

Commit 2a10ece

Browse files
1 parent 965b940 commit 2a10ece

3 files changed

Lines changed: 21 additions & 22 deletions

File tree

app/src/main/java/com/xiaofeng/androidlibs/DemoAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public DemoViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType
3333
@Override
3434
public void onBindViewHolder(@NonNull final DemoViewHolder holder, final int position) {
3535
holder.setTagText(items.get(position));
36-
holder.tagSize.setClickable(false);
36+
//holder.tagSize.setClickable(false);
3737
holder.tagText.setClickable(false);
3838

3939
holder.itemView.setOnClickListener(new View.OnClickListener() {

app/src/main/java/com/xiaofeng/androidlibs/DemoViewHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class DemoViewHolder extends RecyclerView.ViewHolder {
99
public DemoViewHolder(View itemView) {
1010
super(itemView);
1111
tagText = itemView.findViewById(R.id.tag_text);
12-
tagSize = itemView.findViewById(R.id.tag_count);
12+
//tagSize = itemView.findViewById(R.id.tag_count);
1313
}
1414

1515
public void setTagText(String tag) {
Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/ingredientContainerView"
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
35
xmlns:tools="http://schemas.android.com/tools"
4-
android:layout_width="wrap_content"
5-
android:layout_height="wrap_content"
66
android:background="@drawable/tagbg"
7-
android:orientation="horizontal"
8-
android:paddingBottom="10dp"
9-
android:paddingLeft="20dp"
10-
android:paddingRight="20dp"
11-
android:paddingTop="10dp">
12-
<TextView
13-
android:id="@+id/tag_text"
14-
android:layout_width="wrap_content"
15-
android:layout_height="wrap_content"
16-
android:layout_marginRight="4dp"
17-
tools:text="0000"
7+
android:paddingStart="10dp"
8+
android:paddingEnd="10dp"
9+
android:paddingTop="4dp"
10+
android:paddingBottom="4dp"
11+
android:layout_margin="5dp"
12+
android:layout_width="wrap_content"
13+
android:layout_height="wrap_content">
14+
15+
<TextView android:id="@+id/tag_text"
16+
android:textSize="14sp"
1817
android:textColor="@color/colorPrimary"
19-
android:layout_marginEnd="4dp" />
20-
<TextView
21-
android:id="@+id/tag_count"
18+
app:layout_constraintStart_toStartOf="parent"
19+
app:layout_constraintEnd_toEndOf="parent"
20+
app:layout_constraintTop_toTopOf="parent"
21+
app:layout_constraintBottom_toBottomOf="parent"
2222
android:layout_width="wrap_content"
2323
android:layout_height="wrap_content"
24-
tools:text="(4)"
25-
android:textColor="@color/colorPrimary" />
24+
tools:text="Prova"/>
2625

27-
</LinearLayout>
26+
</androidx.constraintlayout.widget.ConstraintLayout>

0 commit comments

Comments
 (0)