some layout improvements
This commit is contained in:
parent
27bfe8875c
commit
475f080dd7
|
@ -94,15 +94,16 @@ public class ReportsListAdapter extends RecyclerView.Adapter implements OnRetrie
|
|||
|
||||
Helper.loadGiF(context, target_account.getAvatar(), holder.account_pp);
|
||||
Helper.loadGiF(context, account.getAvatar(), holder.account_pp_reporter);
|
||||
holder.account_un.setText(String.format("@%s",account.getUsername()));
|
||||
holder.account_ac.setText(account.getAcct());
|
||||
if( account.getUsername().equals(account.getAcct()))
|
||||
holder.account_ac.setVisibility(View.GONE);
|
||||
else
|
||||
holder.account_ac.setVisibility(View.VISIBLE);
|
||||
holder.account_ac.setText(target_account.getAcct());
|
||||
|
||||
holder.report_comment.setText(report.getComment());
|
||||
|
||||
if( report.getStatuses() != null){
|
||||
holder.report_number_status.setText(String.valueOf(report.getStatuses().size()));
|
||||
}else{
|
||||
holder.report_number_status.setText("0");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -144,8 +145,7 @@ public class ReportsListAdapter extends RecyclerView.Adapter implements OnRetrie
|
|||
ImageView account_pp, account_pp_reporter;
|
||||
TextView account_ac;
|
||||
TextView account_dn, account_dn_reporter;
|
||||
TextView account_un;
|
||||
TextView report_comment;
|
||||
TextView report_comment, report_number_status;
|
||||
|
||||
LinearLayout account_container;
|
||||
|
||||
|
@ -156,9 +156,9 @@ public class ReportsListAdapter extends RecyclerView.Adapter implements OnRetrie
|
|||
account_dn = itemView.findViewById(R.id.account_dn);
|
||||
account_dn_reporter = itemView.findViewById(R.id.account_dn_reporter);
|
||||
account_ac = itemView.findViewById(R.id.account_ac);
|
||||
account_un = itemView.findViewById(R.id.account_un);
|
||||
report_comment = itemView.findViewById(R.id.report_comment);
|
||||
account_container = itemView.findViewById(R.id.account_container);
|
||||
report_number_status = itemView.findViewById(R.id.report_number_status);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M21.99,4c0,-1.1 -0.89,-2 -1.99,-2H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h14l4,4 -0.01,-18z"/>
|
||||
</vector>
|
|
@ -17,6 +17,7 @@
|
|||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
|
@ -40,28 +41,15 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:id="@+id/account_container"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/account_dn"
|
||||
android:maxLines="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/account_dn"
|
||||
android:maxLines="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||
<TextView
|
||||
android:id="@+id/account_un"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</LinearLayout>
|
||||
android:textSize="18sp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||
<TextView
|
||||
android:layout_marginTop="10dp"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/account_ac"
|
||||
android:textSize="16sp"
|
||||
android:maxLines="1"
|
||||
|
@ -87,11 +75,34 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_marginStart="10dp"
|
||||
android:id="@+id/report_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/report_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="UseCompoundDrawables">
|
||||
<ImageView
|
||||
android:src="@drawable/ic_mode_comment_white"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_marginStart="5dp"
|
||||
android:id="@+id/report_number_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue