fix spacing stuff in report fragment
This commit is contained in:
parent
12eaa8d5f1
commit
cc699a3f5e
|
@ -83,7 +83,7 @@ public class ReportReasonChoiceFragment extends StatusListFragment{
|
||||||
reportStatus=Parcels.unwrap(getArguments().getParcelable("status"));
|
reportStatus=Parcels.unwrap(getArguments().getParcelable("status"));
|
||||||
if(reportStatus!=null){
|
if(reportStatus!=null){
|
||||||
Status hiddenStatus=reportStatus.clone();
|
Status hiddenStatus=reportStatus.clone();
|
||||||
hiddenStatus.spoilerText=getString(R.string.post_hidden);
|
if(hiddenStatus.spoilerText==null) hiddenStatus.spoilerText=getString(R.string.post_hidden);
|
||||||
onDataLoaded(Collections.singletonList(hiddenStatus));
|
onDataLoaded(Collections.singletonList(hiddenStatus));
|
||||||
setTitle(R.string.report_title_post);
|
setTitle(R.string.report_title_post);
|
||||||
}else{
|
}else{
|
||||||
|
@ -168,17 +168,6 @@ public class ReportReasonChoiceFragment extends StatusListFragment{
|
||||||
((UsableRecyclerView)list).setIncludeMarginsInItemHitbox(false);
|
((UsableRecyclerView)list).setIncludeMarginsInItemHitbox(false);
|
||||||
|
|
||||||
if(reportStatus!=null){
|
if(reportStatus!=null){
|
||||||
list.addItemDecoration(new RecyclerView.ItemDecoration(){
|
|
||||||
@Override
|
|
||||||
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state){
|
|
||||||
RecyclerView.ViewHolder holder=parent.getChildViewHolder(view);
|
|
||||||
if(holder instanceof LinkCardStatusDisplayItem.Holder || holder instanceof MediaGridStatusDisplayItem.Holder){
|
|
||||||
outRect.left=V.dp(16);
|
|
||||||
outRect.right=V.dp(16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
list.addItemDecoration(new RecyclerView.ItemDecoration(){
|
list.addItemDecoration(new RecyclerView.ItemDecoration(){
|
||||||
private Paint paint=new Paint(Paint.ANTI_ALIAS_FLAG);
|
private Paint paint=new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
{
|
{
|
||||||
|
@ -222,10 +211,6 @@ public class ReportReasonChoiceFragment extends StatusListFragment{
|
||||||
if(holder instanceof StatusDisplayItem.Holder<?>){
|
if(holder instanceof StatusDisplayItem.Holder<?>){
|
||||||
outRect.left=outRect.right=V.dp(16);
|
outRect.left=outRect.right=V.dp(16);
|
||||||
}
|
}
|
||||||
int index=holder.getAbsoluteAdapterPosition()-mergeAdapter.getPositionForAdapter(adapter);
|
|
||||||
if(index==displayItems.size()){
|
|
||||||
outRect.top=V.dp(32);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -251,18 +236,6 @@ public class ReportReasonChoiceFragment extends StatusListFragment{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onModifyItemViewHolder(BindableViewHolder<StatusDisplayItem> holder){
|
|
||||||
if((Object)holder instanceof MediaGridStatusDisplayItem.Holder h){
|
|
||||||
View layout=h.getLayout();
|
|
||||||
layout.setOutlineProvider(OutlineProviders.roundedRect(8));
|
|
||||||
layout.setClipToOutline(true);
|
|
||||||
View overlay=h.getSensitiveOverlay();
|
|
||||||
overlay.setOutlineProvider(OutlineProviders.roundedRect(8));
|
|
||||||
overlay.setClipToOutline(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void putRelationship(String id, Relationship rel){
|
public void putRelationship(String id, Relationship rel){
|
||||||
super.putRelationship(id, rel);
|
super.putRelationship(id, rel);
|
||||||
|
|
Loading…
Reference in New Issue