tweak send button

This commit is contained in:
B. Petersen
2019-04-17 00:44:38 +02:00
parent a8d5f17058
commit e7405b59f7
9 changed files with 11 additions and 14 deletions
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="?attr/send_button_color" />
</shape>
+1 -1
View File
@@ -190,7 +190,7 @@
android:layout_height="40dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:background="@drawable/circle_tintable"
android:background="@drawable/circle_send_button"
android:layout_gravity="center_vertical">
<ImageButton
+2 -3
View File
@@ -13,10 +13,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="7dp"
android:background="@drawable/circle_tintable"
android:background="@drawable/circle_send_button"
android:contentDescription="@string/menu_send"
tools:src="@drawable/ic_send_push_white_24dp"
tools:backgroundTint="@color/delta_primary" />
tools:src="@drawable/ic_send_push_white_24dp" />
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent"
+1
View File
@@ -20,6 +20,7 @@
<attr name="conversation_received_card_background" format="reference|color"/>
<attr name="fab_color" format="reference|color" />
<attr name="send_button_color" format="reference|color" />
<attr name="input_panel_bg_color" format="reference|color" />
<attr name="lower_right_divet" format="reference" />
+2
View File
@@ -103,6 +103,7 @@
<item name="fab_color">@color/delta_primary_lite</item>
<item name="input_panel_bg_color">@color/white</item>
<item name="send_button_color">@color/delta_primary</item>
<item name="lower_right_divet">@drawable/divet_lower_right_dark</item>
<item name="conversation_group_member_name">#99000000</item>
@@ -291,6 +292,7 @@
<item name="fab_color">@color/gray78</item>
<item name="input_panel_bg_color">@color/gray95</item>
<item name="send_button_color">@color/gray70</item>
<item name="lower_right_divet">@drawable/divet_lower_right_light</item>
<!-- dark theme -->
@@ -727,7 +727,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
sendButton.setEnabled(true);
sendButton.addOnTransportChangedListener((newTransport, manuallySelected) -> {
composeText.setTransport(newTransport);
buttonToggle.getBackground().setColorFilter(newTransport.getBackgroundColor(), Mode.MULTIPLY);
buttonToggle.getBackground().invalidateSelf();
});
@@ -10,20 +10,17 @@ public class TransportOption {
}
private final int drawable;
private final int backgroundColor;
private final @NonNull String text;
private final @NonNull Type type;
private final @NonNull String composeHint;
public TransportOption(@NonNull Type type,
@DrawableRes int drawable,
int backgroundColor,
@NonNull String text,
@NonNull String composeHint)
{
this.type = type;
this.drawable = drawable;
this.backgroundColor = backgroundColor;
this.text = text;
this.composeHint = composeHint;
}
@@ -40,10 +37,6 @@ public class TransportOption {
return drawable;
}
public int getBackgroundColor() {
return backgroundColor;
}
public @NonNull String getComposeHint() {
return composeHint;
}
@@ -95,7 +95,6 @@ public class TransportOptions {
List<TransportOption> results = new LinkedList<>();
results.add(new TransportOption(Type.NORMAL_MAIL, R.drawable.ic_send_sms_white_24dp,
context.getResources().getColor(R.color.delta_primary),
context.getString(R.string.app_name),
context.getString(R.string.chat_input_placeholder)));
@@ -58,7 +58,6 @@ public class TransportOptionsAdapter extends BaseAdapter {
TextView textView = ViewUtil.findById(convertView, R.id.text);
TextView subtextView = ViewUtil.findById(convertView, R.id.subtext);
imageView.getBackground().setColorFilter(transport.getBackgroundColor(), Mode.MULTIPLY);
imageView.setImageResource(transport.getDrawable());
textView.setText(transport.getDescription());
subtextView.setVisibility(View.GONE);