Changing translate icon
This commit is contained in:
@@ -74,7 +74,6 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||||||
private final TextView spoilerTitle, spoilerTitleInline;
|
private final TextView spoilerTitle, spoilerTitleInline;
|
||||||
private final View spoilerOverlay, borderTop, borderBottom;
|
private final View spoilerOverlay, borderTop, borderBottom;
|
||||||
private final Drawable backgroundColor, borderColor;
|
private final Drawable backgroundColor, borderColor;
|
||||||
private final Button translateToggle;
|
|
||||||
|
|
||||||
public Holder(Activity activity, ViewGroup parent){
|
public Holder(Activity activity, ViewGroup parent){
|
||||||
super(activity, R.layout.display_item_text, parent);
|
super(activity, R.layout.display_item_text, parent);
|
||||||
@@ -84,7 +83,6 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||||||
spoilerHeader=findViewById(R.id.spoiler_header);
|
spoilerHeader=findViewById(R.id.spoiler_header);
|
||||||
spoilerOverlay=findViewById(R.id.spoiler_overlay);
|
spoilerOverlay=findViewById(R.id.spoiler_overlay);
|
||||||
borderTop=findViewById(R.id.border_top);
|
borderTop=findViewById(R.id.border_top);
|
||||||
translateToggle=findViewById(R.id.translate);
|
|
||||||
borderBottom=findViewById(R.id.border_bottom);
|
borderBottom=findViewById(R.id.border_bottom);
|
||||||
itemView.setOnClickListener(v->item.parentFragment.onRevealSpoilerClick(this));
|
itemView.setOnClickListener(v->item.parentFragment.onRevealSpoilerClick(this));
|
||||||
|
|
||||||
@@ -108,6 +106,8 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onError(ErrorResponse error){
|
public void onError(ErrorResponse error){
|
||||||
|
item.status.wantsTranslation=false;
|
||||||
|
text.setText(item.text);
|
||||||
error.showToast(item.parentFragment.getActivity());
|
error.showToast(item.parentFragment.getActivity());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<vector android:height="24dp" android:tint="#000000"
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
android:viewportHeight="24" android:viewportWidth="24"
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path android:fillColor="?colorSecondary" android:pathData="M20,5h-9.12L10,2L4,2c-1.1,0 -2,0.9 -2,2v13c0,1.1 0.9,2 2,2h7l1,3h8c1.1,0 2,-0.9 2,-2L22,7c0,-1.1 -0.9,-2 -2,-2zM7.17,14.59c-2.25,0 -4.09,-1.83 -4.09,-4.09s1.83,-4.09 4.09,-4.09c1.04,0 1.99,0.37 2.74,1.07l0.07,0.06 -1.23,1.18 -0.06,-0.05c-0.29,-0.27 -0.78,-0.59 -1.52,-0.59 -1.31,0 -2.38,1.09 -2.38,2.42s1.07,2.42 2.38,2.42c1.37,0 1.96,-0.87 2.12,-1.46L7.08,11.46L7.08,9.91h3.95l0.01,0.07c0.04,0.21 0.05,0.4 0.05,0.61 0,2.35 -1.61,4 -3.92,4zM13.2,12.88c0.33,0.6 0.74,1.18 1.19,1.7l-0.54,0.53 -0.65,-2.23zM13.97,12.12h-0.99l-0.31,-1.04h3.99s-0.34,1.31 -1.56,2.74c-0.52,-0.62 -0.89,-1.23 -1.13,-1.7zM21,20c0,0.55 -0.45,1 -1,1h-7l2,-2 -0.81,-2.77 0.92,-0.92L17.79,18l0.73,-0.73 -2.71,-2.68c0.9,-1.03 1.6,-2.25 1.92,-3.51L19,11.08v-1.04h-3.64L15.36,9h-1.04v1.04h-1.96L11.18,6L20,6c0.55,0 1,0.45 1,1v13z"/>
|
<path android:fillColor="?colorSecondary" android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<vector android:height="24dp" android:tint="#000000"
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
android:viewportHeight="24" android:viewportWidth="24"
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path android:fillColor="?colorSecondary" android:pathData="M21,4L11,4l-1,-3L3,1c-1.1,0 -2,0.9 -2,2v15c0,1.1 0.9,2 2,2h8l1,3h9c1.1,0 2,-0.9 2,-2L23,6c0,-1.1 -0.9,-2 -2,-2zM7,16c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5c1.35,0 2.48,0.5 3.35,1.3L9.03,8.57c-0.38,-0.36 -1.04,-0.78 -2.03,-0.78 -1.74,0 -3.15,1.44 -3.15,3.21S5.26,14.21 7,14.21c2.01,0 2.84,-1.44 2.92,-2.41L7,11.8v-1.71h4.68c0.07,0.31 0.12,0.61 0.12,1.02C11.8,13.97 9.89,16 7,16zM13.17,10.58h3.7c-0.43,1.25 -1.11,2.43 -2.05,3.47 -0.31,-0.35 -0.6,-0.72 -0.86,-1.1l-0.79,-2.37zM21.5,20.5c0,0.55 -0.45,1 -1,1L14,21.5l2,-2.5 -1.04,-3.1 3.1,3.1 0.92,-0.92 -3.3,-3.25 0.02,-0.02c1.13,-1.25 1.93,-2.69 2.4,-4.22L20,10.59v-1.3h-4.53L15.47,8h-1.29v1.29h-1.44L11.46,5.5h9.04c0.55,0 1,0.45 1,1v14z"/>
|
<path android:fillColor="?colorSecondary" android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
Reference in New Issue
Block a user