From 962ecbedfa5787058e274c1e468bf5e120f75c71 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 1 Apr 2018 09:18:12 +0200 Subject: [PATCH] made checkboxes and radiobuttons stylable --- .../ui/JoinConferenceDialog.java | 8 +- .../res/layout/activity_contact_details.xml | 13 +-- src/main/res/layout/activity_edit_account.xml | 1 + src/main/res/layout/activity_set_presence.xml | 82 ------------------- src/main/res/layout/dialog_block_contact.xml | 1 + src/main/res/layout/dialog_clear_history.xml | 21 ++--- ..._dialog.xml => dialog_join_conference.xml} | 12 +-- src/main/res/layout/dialog_presence.xml | 4 + src/main/res/values/styles.xml | 9 ++ 9 files changed, 43 insertions(+), 108 deletions(-) delete mode 100644 src/main/res/layout/activity_set_presence.xml rename src/main/res/layout/{join_conference_dialog.xml => dialog_join_conference.xml} (86%) diff --git a/src/main/java/eu/siacs/conversations/ui/JoinConferenceDialog.java b/src/main/java/eu/siacs/conversations/ui/JoinConferenceDialog.java index 95379fd3f..d20a796ab 100644 --- a/src/main/java/eu/siacs/conversations/ui/JoinConferenceDialog.java +++ b/src/main/java/eu/siacs/conversations/ui/JoinConferenceDialog.java @@ -9,19 +9,15 @@ import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.support.v7.app.AlertDialog; -import android.view.View; import android.widget.AutoCompleteTextView; -import android.widget.CheckBox; -import android.widget.Checkable; import android.widget.Spinner; import java.util.ArrayList; import java.util.Collection; -import java.util.HashSet; import java.util.List; import eu.siacs.conversations.R; -import eu.siacs.conversations.databinding.JoinConferenceDialogBinding; +import eu.siacs.conversations.databinding.DialogJoinConferenceBinding; import eu.siacs.conversations.ui.adapter.KnownHostsAdapter; import eu.siacs.conversations.ui.interfaces.OnBackendConnected; import eu.siacs.conversations.ui.util.DelayedHintHelper; @@ -53,7 +49,7 @@ public class JoinConferenceDialog extends DialogFragment implements OnBackendCon public Dialog onCreateDialog(Bundle savedInstanceState) { final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle(R.string.dialog_title_join_conference); - JoinConferenceDialogBinding binding = DataBindingUtil.inflate(getActivity().getLayoutInflater(), R.layout.join_conference_dialog, null, false); + DialogJoinConferenceBinding binding = DataBindingUtil.inflate(getActivity().getLayoutInflater(), R.layout.dialog_join_conference, null, false); DelayedHintHelper.setHint(R.string.conference_address_example, binding.jid); this.knownHostsAdapter = new KnownHostsAdapter(getActivity(), R.layout.simple_list_item); binding.jid.setAdapter(knownHostsAdapter); diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml index d85b7e25b..9d20cff90 100644 --- a/src/main/res/layout/activity_contact_details.xml +++ b/src/main/res/layout/activity_contact_details.xml @@ -1,6 +1,6 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> - + @@ -160,9 +163,9 @@ style="?android:attr/borderlessButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:minWidth="0dp" android:paddingLeft="16dp" android:paddingRight="16dp" - android:minWidth="0dp" android:text="@string/show_inactive_devices" android:textColor="?attr/colorAccent"/> diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index 09f498a54..f826a949e 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -149,6 +149,7 @@ - - - - - - - - - - - - - - - - -