Show checkmark on calendar and gtask list picker

pull/574/head
Alex Baker 7 years ago
parent 58df07be2e
commit 266cb5640d

@ -8,6 +8,7 @@ package com.todoroo.astrid.gtasks;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.preference.CheckBoxPreference; import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.andlib.utility.DateUtilities;
@ -16,7 +17,6 @@ import com.todoroo.astrid.data.Metadata;
import com.todoroo.astrid.gtasks.auth.GtasksLoginActivity; import com.todoroo.astrid.gtasks.auth.GtasksLoginActivity;
import org.tasks.R; import org.tasks.R;
import org.tasks.activities.NativeGoogleTaskListPicker;
import org.tasks.analytics.Tracker; import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking; import org.tasks.analytics.Tracking;
import org.tasks.dialogs.DialogBuilder; import org.tasks.dialogs.DialogBuilder;
@ -31,6 +31,7 @@ import org.tasks.preferences.PermissionRequestor;
import javax.inject.Inject; import javax.inject.Inject;
import static org.tasks.PermissionUtil.verifyPermissions; import static org.tasks.PermissionUtil.verifyPermissions;
import static org.tasks.activities.NativeGoogleTaskListPicker.newNativeGoogleTaskListPicker;
public class GtasksPreferences extends InjectingPreferenceActivity implements GoogleTaskListSelectionHandler { public class GtasksPreferences extends InjectingPreferenceActivity implements GoogleTaskListSelectionHandler {
@ -93,12 +94,20 @@ public class GtasksPreferences extends InjectingPreferenceActivity implements Go
.show(); .show();
return true; return true;
}); });
findPreference(R.string.p_gtasks_default_list).setOnPreferenceClickListener(preference -> { Preference defaultListPreference = findPreference(R.string.p_gtasks_default_list);
new NativeGoogleTaskListPicker() defaultListPreference.setOnPreferenceClickListener(preference -> {
newNativeGoogleTaskListPicker(getDefaultList())
.show(getFragmentManager(), FRAG_TAG_GOOGLE_TASK_LIST_SELECTION); .show(getFragmentManager(), FRAG_TAG_GOOGLE_TASK_LIST_SELECTION);
return false; return false;
}); });
updateDefaultGoogleTaskList(); GtasksList defaultList = getDefaultList();
if (defaultList != null) {
defaultListPreference.setSummary(defaultList.getName());
}
}
private GtasksList getDefaultList() {
return gtasksListService.getList(gtasksPreferenceService.getDefaultList());
} }
private void requestLogin() { private void requestLogin() {
@ -153,13 +162,7 @@ public class GtasksPreferences extends InjectingPreferenceActivity implements Go
tracker.reportEvent(Tracking.Events.GTASK_DEFAULT_LIST); tracker.reportEvent(Tracking.Events.GTASK_DEFAULT_LIST);
String listId = list.getRemoteId(); String listId = list.getRemoteId();
gtasksPreferenceService.setDefaultList(listId); gtasksPreferenceService.setDefaultList(listId);
updateDefaultGoogleTaskList();
}
private void updateDefaultGoogleTaskList() {
GtasksList list = gtasksListService.getList(gtasksPreferenceService.getDefaultList());
if (list != null) {
findPreference(R.string.p_gtasks_default_list).setSummary(list.getName()); findPreference(R.string.p_gtasks_default_list).setSummary(list.getName());
} }
}
} }

@ -4,6 +4,8 @@ import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
import android.os.Bundle; import android.os.Bundle;
import com.todoroo.astrid.data.StoreObject;
import com.todoroo.astrid.gtasks.GtasksList;
import com.todoroo.astrid.gtasks.GtasksListService; import com.todoroo.astrid.gtasks.GtasksListService;
import org.tasks.dialogs.DialogBuilder; import org.tasks.dialogs.DialogBuilder;
@ -18,6 +20,18 @@ import static org.tasks.activities.SupportGoogleTaskListPicker.createDialog;
public class NativeGoogleTaskListPicker extends InjectingNativeDialogFragment { public class NativeGoogleTaskListPicker extends InjectingNativeDialogFragment {
public static NativeGoogleTaskListPicker newNativeGoogleTaskListPicker(GtasksList defaultList) {
NativeGoogleTaskListPicker dialog = new NativeGoogleTaskListPicker();
Bundle arguments = new Bundle();
if (defaultList != null) {
arguments.putParcelable(EXTRA_SELECTED, defaultList.getStoreObject());
}
dialog.setArguments(arguments);
return dialog;
}
public static final String EXTRA_SELECTED = "extra_selected";
@Inject DialogBuilder dialogBuilder; @Inject DialogBuilder dialogBuilder;
@Inject GtasksListService gtasksListService; @Inject GtasksListService gtasksListService;
@Inject ThemeCache themeCache; @Inject ThemeCache themeCache;
@ -26,7 +40,14 @@ public class NativeGoogleTaskListPicker extends InjectingNativeDialogFragment {
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
return createDialog(getActivity(), themeCache, dialogBuilder, gtasksListService, list -> handler.selectedList(list)); Bundle arguments = getArguments();
StoreObject storeObject = arguments.getParcelable(EXTRA_SELECTED);
GtasksList selected = null;
if (storeObject != null) {
selected = new GtasksList(storeObject);
}
return createDialog(getActivity(), themeCache, dialogBuilder, gtasksListService,
selected, list -> handler.selectedList(list));
} }
@Override @Override

@ -13,8 +13,9 @@ import android.support.v7.app.AlertDialog;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.TextView; import android.widget.CheckedTextView;
import com.todoroo.astrid.data.StoreObject;
import com.todoroo.astrid.gtasks.GtasksList; import com.todoroo.astrid.gtasks.GtasksList;
import com.todoroo.astrid.gtasks.GtasksListService; import com.todoroo.astrid.gtasks.GtasksListService;
@ -34,6 +35,18 @@ import static com.todoroo.andlib.utility.AndroidUtilities.atLeastJellybeanMR1;
public class SupportGoogleTaskListPicker extends InjectingDialogFragment { public class SupportGoogleTaskListPicker extends InjectingDialogFragment {
public static SupportGoogleTaskListPicker newSupportGoogleTaskListPicker(GtasksList selected) {
SupportGoogleTaskListPicker dialog = new SupportGoogleTaskListPicker();
Bundle arguments = new Bundle();
if (selected != null) {
arguments.putParcelable(EXTRA_SELECTED, selected.getStoreObject());
}
dialog.setArguments(arguments);
return dialog;
}
private static final String EXTRA_SELECTED = "extra_selected";
@Inject DialogBuilder dialogBuilder; @Inject DialogBuilder dialogBuilder;
@Inject GtasksListService gtasksListService; @Inject GtasksListService gtasksListService;
@Inject ThemeCache themeCache; @Inject ThemeCache themeCache;
@ -43,7 +56,14 @@ public class SupportGoogleTaskListPicker extends InjectingDialogFragment {
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
return createDialog(getActivity(), themeCache, dialogBuilder, gtasksListService, list -> handler.selectedList(list)); Bundle arguments = getArguments();
StoreObject storeObject = arguments.getParcelable(EXTRA_SELECTED);
GtasksList selected = null;
if (storeObject != null) {
selected = new GtasksList(storeObject);
}
return createDialog(getActivity(), themeCache, dialogBuilder, gtasksListService,
selected, list -> handler.selectedList(list));
} }
@Override @Override
@ -53,15 +73,24 @@ public class SupportGoogleTaskListPicker extends InjectingDialogFragment {
handler = (GoogleTaskListSelectionHandler) activity; handler = (GoogleTaskListSelectionHandler) activity;
} }
public static AlertDialog createDialog(Context context, ThemeCache themeCache, DialogBuilder dialogBuilder, GtasksListService gtasksListService, final GoogleTaskListSelectionHandler handler) { public static AlertDialog createDialog(Context context, ThemeCache themeCache,
DialogBuilder dialogBuilder, GtasksListService gtasksListService,
GtasksList selected, final GoogleTaskListSelectionHandler handler) {
final List<GtasksList> lists = gtasksListService.getLists(); final List<GtasksList> lists = gtasksListService.getLists();
ArrayAdapter<GtasksList> adapter = new ArrayAdapter<GtasksList>(context, R.layout.simple_list_item_single_choice_themed, lists) { ArrayAdapter<GtasksList> adapter = new ArrayAdapter<GtasksList>(context, R.layout.simple_list_item_single_choice_themed, lists) {
@SuppressLint("NewApi") @SuppressLint("NewApi")
@NonNull @NonNull
@Override @Override
public View getView(int position, View convertView, ViewGroup parent) { public View getView(int position, View convertView, ViewGroup parent) {
TextView view = (TextView) super.getView(position, convertView, parent); CheckedTextView view = (CheckedTextView) super.getView(position, convertView, parent);
GtasksList list = lists.get(position); GtasksList list = lists.get(position);
if (selected != null && list.getRemoteId().equals(selected.getRemoteId())) {
view.setCheckMarkDrawable(R.drawable.ic_check_white_24dp);
view.setChecked(true);
} else {
view.setCheckMarkDrawable(null);
view.setChecked(false);
}
int color = list.getColor(); int color = list.getColor();
ThemeColor themeColor = themeCache.getThemeColor(color >= 0 ? color : 19); ThemeColor themeColor = themeCache.getThemeColor(color >= 0 ? color : 19);
view.setText(list.getName()); view.setText(list.getName());

@ -29,6 +29,7 @@ import butterknife.BindView;
import butterknife.OnClick; import butterknife.OnClick;
import static com.todoroo.andlib.utility.DateUtilities.now; import static com.todoroo.andlib.utility.DateUtilities.now;
import static org.tasks.activities.SupportGoogleTaskListPicker.newSupportGoogleTaskListPicker;
public class GoogleTaskListFragment extends TaskEditControlFragment { public class GoogleTaskListFragment extends TaskEditControlFragment {
@ -110,7 +111,7 @@ public class GoogleTaskListFragment extends TaskEditControlFragment {
@OnClick(R.id.google_task_list) @OnClick(R.id.google_task_list)
void clickGoogleTaskList(View view) { void clickGoogleTaskList(View view) {
new SupportGoogleTaskListPicker() newSupportGoogleTaskListPicker(selectedList)
.show(getChildFragmentManager(), FRAG_TAG_GOOGLE_TASK_LIST_SELECTION); .show(getChildFragmentManager(), FRAG_TAG_GOOGLE_TASK_LIST_SELECTION);
} }

@ -24,12 +24,6 @@ import javax.inject.Inject;
import static org.tasks.PermissionUtil.verifyPermissions; import static org.tasks.PermissionUtil.verifyPermissions;
/**
* Displays the preference screen for users to edit their preferences
*
* @author Tim Su <tim@todoroo.com>
*
*/
public class DefaultsPreferences extends InjectingPreferenceActivity { public class DefaultsPreferences extends InjectingPreferenceActivity {
private static final int REQUEST_CALENDAR_SELECTION = 10412; private static final int REQUEST_CALENDAR_SELECTION = 10412;
@ -52,22 +46,24 @@ public class DefaultsPreferences extends InjectingPreferenceActivity {
} }
return false; return false;
}); });
setCalendarSummary(preferences.getStringValue(R.string.gcal_p_default)); String defaultCalendarName = getDefaultCalendarName();
} defaultCalendarPref.setSummary(defaultCalendarName == null
private void setCalendarSummary(String calendarId) {
AndroidCalendar calendar = calendarProvider.getCalendar(calendarId);
defaultCalendarPref.setSummary(calendar == null
? getString(R.string.none) ? getString(R.string.none)
: calendar.getName()); : defaultCalendarName);
} }
private void startCalendarSelectionActivity() { private void startCalendarSelectionActivity() {
Intent intent = new Intent(DefaultsPreferences.this, CalendarSelectionActivity.class); Intent intent = new Intent(DefaultsPreferences.this, CalendarSelectionActivity.class);
intent.putExtra(CalendarSelectionActivity.EXTRA_SHOW_NONE, true); intent.putExtra(CalendarSelectionActivity.EXTRA_SHOW_NONE, true);
intent.putExtra(CalendarSelectionActivity.EXTRA_CALENDAR_NAME, getDefaultCalendarName());
startActivityForResult(intent, REQUEST_CALENDAR_SELECTION); startActivityForResult(intent, REQUEST_CALENDAR_SELECTION);
} }
private String getDefaultCalendarName() {
AndroidCalendar calendar = calendarProvider.getCalendar(preferences.getStringValue(R.string.gcal_p_default));
return calendar == null ? null : calendar.getName();
}
@Override @Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
if (requestCode == PermissionRequestor.REQUEST_CALENDAR) { if (requestCode == PermissionRequestor.REQUEST_CALENDAR) {
@ -82,9 +78,10 @@ public class DefaultsPreferences extends InjectingPreferenceActivity {
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_CALENDAR_SELECTION && resultCode == RESULT_OK) { if (requestCode == REQUEST_CALENDAR_SELECTION && resultCode == RESULT_OK) {
String calendarId = data.getStringExtra(CalendarSelectionActivity.EXTRA_CALENDAR_ID); preferences.setString(R.string.gcal_p_default,
preferences.setString(R.string.gcal_p_default, calendarId); data.getStringExtra(CalendarSelectionActivity.EXTRA_CALENDAR_ID));
setCalendarSummary(calendarId); defaultCalendarPref.setSummary(
data.getStringExtra(CalendarSelectionActivity.EXTRA_CALENDAR_NAME));
} else { } else {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
} }

@ -24,7 +24,10 @@ public class CalendarSelectionActivity extends InjectingAppCompatActivity implem
FragmentManager fragmentManager = getSupportFragmentManager(); FragmentManager fragmentManager = getSupportFragmentManager();
CalendarSelectionDialog fragmentByTag = (CalendarSelectionDialog) fragmentManager.findFragmentByTag(FRAG_TAG_CALENDAR_PREFERENCE_SELECTION); CalendarSelectionDialog fragmentByTag = (CalendarSelectionDialog) fragmentManager.findFragmentByTag(FRAG_TAG_CALENDAR_PREFERENCE_SELECTION);
if (fragmentByTag == null) { if (fragmentByTag == null) {
fragmentByTag = newCalendarSelectionDialog(getIntent().getBooleanExtra(EXTRA_SHOW_NONE, false)); Intent intent = getIntent();
fragmentByTag = newCalendarSelectionDialog(
intent.getBooleanExtra(EXTRA_SHOW_NONE, false),
intent.getStringExtra(EXTRA_CALENDAR_NAME));
fragmentByTag.show(fragmentManager, FRAG_TAG_CALENDAR_PREFERENCE_SELECTION); fragmentByTag.show(fragmentManager, FRAG_TAG_CALENDAR_PREFERENCE_SELECTION);
} }
fragmentByTag.setCalendarSelectionHandler(this); fragmentByTag.setCalendarSelectionHandler(this);

@ -4,7 +4,6 @@ import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.widget.ArrayAdapter;
import android.widget.Toast; import android.widget.Toast;
import org.tasks.R; import org.tasks.R;
@ -18,6 +17,7 @@ import org.tasks.preferences.FragmentPermissionRequestor;
import org.tasks.preferences.PermissionChecker; import org.tasks.preferences.PermissionChecker;
import org.tasks.preferences.PermissionRequestor; import org.tasks.preferences.PermissionRequestor;
import org.tasks.themes.Theme; import org.tasks.themes.Theme;
import org.tasks.ui.SingleCheckedArrayAdapter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -29,9 +29,12 @@ import static org.tasks.PermissionUtil.verifyPermissions;
public class CalendarSelectionDialog extends InjectingDialogFragment { public class CalendarSelectionDialog extends InjectingDialogFragment {
public static CalendarSelectionDialog newCalendarSelectionDialog(boolean enableNone) { public static CalendarSelectionDialog newCalendarSelectionDialog(boolean enableNone, String selected) {
CalendarSelectionDialog dialog = new CalendarSelectionDialog(); CalendarSelectionDialog dialog = new CalendarSelectionDialog();
dialog.enableNone = enableNone; Bundle arguments = new Bundle();
arguments.putBoolean(EXTRA_NONE_ENABLED, enableNone);
arguments.putString(EXTRA_SELECTED, selected);
dialog.setArguments(arguments);
return dialog; return dialog;
} }
@ -41,6 +44,7 @@ public class CalendarSelectionDialog extends InjectingDialogFragment {
void cancel(); void cancel();
} }
private static final String EXTRA_SELECTED = "extra_selected";
private static final String EXTRA_NONE_ENABLED = "extra_none_enabled"; private static final String EXTRA_NONE_ENABLED = "extra_none_enabled";
@Inject DialogBuilder dialogBuilder; @Inject DialogBuilder dialogBuilder;
@ -48,29 +52,29 @@ public class CalendarSelectionDialog extends InjectingDialogFragment {
@Inject FragmentPermissionRequestor fragmentPermissionRequestor; @Inject FragmentPermissionRequestor fragmentPermissionRequestor;
@Inject PermissionChecker permissionChecker; @Inject PermissionChecker permissionChecker;
@Inject Theme theme; @Inject Theme theme;
private CalendarSelectionHandler handler; private CalendarSelectionHandler handler;
private boolean enableNone; private String selected;
private ArrayAdapter<String> adapter; private SingleCheckedArrayAdapter adapter;
private final List<AndroidCalendar> calendars = new ArrayList<>(); private final List<AndroidCalendar> calendars = new ArrayList<>();
private final List<String> calendarNames = new ArrayList<>(); private final List<String> calendarNames = new ArrayList<>();
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
if (savedInstanceState == null) {
fragmentPermissionRequestor.requestCalendarPermissions(); fragmentPermissionRequestor.requestCalendarPermissions();
} else {
enableNone = savedInstanceState.getBoolean(EXTRA_NONE_ENABLED); Bundle arguments = getArguments();
} selected = arguments.getString(EXTRA_SELECTED);
theme.applyToContext(getActivity()); theme.applyToContext(getActivity());
adapter = new ArrayAdapter<>(getActivity(), R.layout.simple_list_item_single_choice_themed, calendarNames); adapter = new SingleCheckedArrayAdapter(getActivity(), calendarNames);
AlertDialogBuilder builder = dialogBuilder.newDialog() AlertDialogBuilder builder = dialogBuilder.newDialog()
.setAdapter(adapter, (dialog, which) -> handler.selectedCalendar(calendars.get(which))) .setSingleChoiceItems(adapter, -1, (dialog, which) -> handler.selectedCalendar(calendars.get(which)))
.setNegativeButton(android.R.string.cancel, (dialogInterface, i) -> handler.cancel()); .setNegativeButton(android.R.string.cancel, (dialogInterface, i) -> handler.cancel());
if (enableNone) { if (arguments.getBoolean(EXTRA_NONE_ENABLED)) {
builder.setNeutralButton(R.string.none, (dialog, which) -> handler.selectedCalendar(AndroidCalendar.NONE)); builder.setNeutralButton(R.string.none, (dialog, which) -> handler.selectedCalendar(new AndroidCalendar("-1", getString(R.string.none))));
} }
return builder.show(); return builder.show();
@ -89,18 +93,12 @@ public class CalendarSelectionDialog extends InjectingDialogFragment {
Toast.makeText(getActivity(), R.string.no_calendars_found, Toast.LENGTH_LONG).show(); Toast.makeText(getActivity(), R.string.no_calendars_found, Toast.LENGTH_LONG).show();
handler.cancel(); handler.cancel();
} else { } else {
adapter.setChecked(selected);
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
} }
} }
} }
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(EXTRA_NONE_ENABLED, enableNone);
}
@Override @Override
public void onCancel(DialogInterface dialog) { public void onCancel(DialogInterface dialog) {
super.onCancel(dialog); super.onCancel(dialog);

@ -4,8 +4,6 @@ public class AndroidCalendar {
private final String id; private final String id;
private final String name; private final String name;
public static final AndroidCalendar NONE = new AndroidCalendar("-1", "NONE");
public AndroidCalendar(String id, String name) { public AndroidCalendar(String id, String name) {
this.id = id; this.id = id;
this.name = name; this.name = name;

@ -240,7 +240,9 @@ public class CalendarControlSet extends TaskEditControlFragment {
@OnClick(R.id.calendar_display_which) @OnClick(R.id.calendar_display_which)
void clickCalendar(View view) { void clickCalendar(View view) {
if (Strings.isNullOrEmpty(eventUri)) { if (Strings.isNullOrEmpty(eventUri)) {
startActivityForResult(new Intent(context, CalendarSelectionActivity.class), REQUEST_CODE_PICK_CALENDAR); Intent intent = new Intent(context, CalendarSelectionActivity.class);
intent.putExtra(CalendarSelectionActivity.EXTRA_CALENDAR_NAME, calendarName);
startActivityForResult(intent, REQUEST_CODE_PICK_CALENDAR);
} else { } else {
if (permissionRequestor.requestCalendarPermissions(REQUEST_CODE_OPEN_EVENT)) { if (permissionRequestor.requestCalendarPermissions(REQUEST_CODE_OPEN_EVENT)) {
openCalendarEvent(); openCalendarEvent();

@ -0,0 +1,46 @@
package org.tasks.ui;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckedTextView;
import org.tasks.R;
import java.util.List;
public class SingleCheckedArrayAdapter<T> extends ArrayAdapter<T> {
private final List<T> items;
private int checkedPosition = -1;
public SingleCheckedArrayAdapter(@NonNull Context context, @NonNull List<T> items) {
super(context, R.layout.simple_list_item_single_choice_themed, items);
this.items = items;
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
CheckedTextView view = (CheckedTextView) super.getView(position, convertView, parent);
if (this.checkedPosition == position) {
view.setCheckMarkDrawable(R.drawable.ic_check_white_24dp);
view.setChecked(true);
} else {
view.setCheckMarkDrawable(null);
view.setChecked(false);
}
return view;
}
public void setChecked(T item) {
setChecked(items.indexOf(item));
}
public void setChecked(int position) {
this.checkedPosition = position;
}
}

@ -13,10 +13,14 @@
limitations under the License. limitations under the License.
--> -->
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v7.widget.AppCompatCheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1" android:id="@android:id/text1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight" android:checkMark="@drawable/ic_check_white_24dp"
android:checkMarkTint="?colorAccent"
android:checked="false"
android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:textAppearance="?attr/textAppearanceListItemSmall"
android:drawablePadding="@dimen/keyline_second" android:drawablePadding="@dimen/keyline_second"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/keyline_first" android:paddingEnd="@dimen/keyline_first"

Loading…
Cancel
Save