mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-27 01:57:32 +01:00
Show the list of alarms as (material design) cards
This commit is contained in:
parent
dd5ee03932
commit
018c2a971e
@ -19,8 +19,9 @@ package nodomain.freeyourgadget.gadgetbridge.activities;
|
|||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
|
import android.support.v7.widget.RecyclerView;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.widget.ListView;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -64,8 +65,10 @@ public class ConfigureAlarms extends GBActivity {
|
|||||||
|
|
||||||
mGBAlarmListAdapter = new GBAlarmListAdapter(this, preferencesAlarmListSet);
|
mGBAlarmListAdapter = new GBAlarmListAdapter(this, preferencesAlarmListSet);
|
||||||
|
|
||||||
ListView listView = (ListView) findViewById(R.id.alarm_list);
|
RecyclerView alarmsRecyclerView = (RecyclerView) findViewById(R.id.alarm_list);
|
||||||
listView.setAdapter(mGBAlarmListAdapter);
|
alarmsRecyclerView.setHasFixedSize(true);
|
||||||
|
alarmsRecyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
|
alarmsRecyclerView.setAdapter(mGBAlarmListAdapter);
|
||||||
updateAlarmsFromPrefs();
|
updateAlarmsFromPrefs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,20 +19,21 @@ package nodomain.freeyourgadget.gadgetbridge.adapter;
|
|||||||
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.support.v7.widget.CardView;
|
||||||
|
import android.support.v7.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.CheckedTextView;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.Switch;
|
import android.widget.Switch;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.ConfigureAlarms;
|
import nodomain.freeyourgadget.gadgetbridge.activities.ConfigureAlarms;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBAlarm;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBAlarm;
|
||||||
@ -41,22 +42,18 @@ import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
|
|||||||
/**
|
/**
|
||||||
* Adapter for displaying GBAlarm instances.
|
* Adapter for displaying GBAlarm instances.
|
||||||
*/
|
*/
|
||||||
public class GBAlarmListAdapter extends ArrayAdapter<GBAlarm> {
|
public class GBAlarmListAdapter extends RecyclerView.Adapter<GBAlarmListAdapter.ViewHolder> {
|
||||||
|
|
||||||
|
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private ArrayList<GBAlarm> alarmList;
|
private List<GBAlarm> alarmList;
|
||||||
|
|
||||||
public GBAlarmListAdapter(Context context, ArrayList<GBAlarm> alarmList) {
|
|
||||||
super(context, 0, alarmList);
|
|
||||||
|
|
||||||
|
public GBAlarmListAdapter(Context context, List<GBAlarm> alarmList) {
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
this.alarmList = alarmList;
|
this.alarmList = alarmList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GBAlarmListAdapter(Context context, Set<String> preferencesAlarmListSet) {
|
public GBAlarmListAdapter(Context context, Set<String> preferencesAlarmListSet) {
|
||||||
super(context, 0, new ArrayList<GBAlarm>());
|
|
||||||
|
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
alarmList = new ArrayList<>();
|
alarmList = new ArrayList<>();
|
||||||
|
|
||||||
@ -81,7 +78,7 @@ public class GBAlarmListAdapter extends ArrayAdapter<GBAlarm> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<? extends Alarm> getAlarmList() {
|
public ArrayList<? extends Alarm> getAlarmList() {
|
||||||
return alarmList;
|
return (ArrayList) alarmList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,53 +92,26 @@ public class GBAlarmListAdapter extends ArrayAdapter<GBAlarm> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getCount() {
|
public GBAlarmListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
if (alarmList != null) {
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.alarm_item, parent, false);
|
||||||
return alarmList.size();
|
ViewHolder vh = new ViewHolder(view);
|
||||||
}
|
return vh;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GBAlarm getItem(int position) {
|
public void onBindViewHolder(ViewHolder holder, final int position) {
|
||||||
if (alarmList != null) {
|
|
||||||
return alarmList.get(position);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
final GBAlarm alarm = alarmList.get(position);
|
||||||
public long getItemId(int position) {
|
|
||||||
if (alarmList != null) {
|
|
||||||
return alarmList.get(position).getIndex();
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
holder.alarmDayMonday.setChecked(alarm.getRepetition(Alarm.ALARM_MON));
|
||||||
public View getView(int position, View view, ViewGroup parent) {
|
holder.alarmDayTuesday.setChecked(alarm.getRepetition(Alarm.ALARM_TUE));
|
||||||
|
holder.alarmDayWednesday.setChecked(alarm.getRepetition(Alarm.ALARM_WED));
|
||||||
|
holder.alarmDayThursday.setChecked(alarm.getRepetition(Alarm.ALARM_THU));
|
||||||
|
holder.alarmDayFriday.setChecked(alarm.getRepetition(Alarm.ALARM_FRI));
|
||||||
|
holder.alarmDaySaturday.setChecked(alarm.getRepetition(Alarm.ALARM_SAT));
|
||||||
|
holder.alarmDaySunday.setChecked(alarm.getRepetition(Alarm.ALARM_SUN));
|
||||||
|
|
||||||
final GBAlarm alarm = getItem(position);
|
holder.isEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
|
||||||
if (view == null) {
|
|
||||||
LayoutInflater inflater = (LayoutInflater) mContext
|
|
||||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
||||||
view = inflater.inflate(R.layout.alarm_item, parent, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
TextView alarmTime = (TextView) view.findViewById(R.id.alarm_item_time);
|
|
||||||
Switch isEnabled = (Switch) view.findViewById(R.id.alarm_item_toggle);
|
|
||||||
TextView isSmartWakeup = (TextView) view.findViewById(R.id.alarm_smart_wakeup);
|
|
||||||
|
|
||||||
highlightDay((TextView) view.findViewById(R.id.alarm_item_sunday), alarm.getRepetition(Alarm.ALARM_SUN));
|
|
||||||
highlightDay((TextView) view.findViewById(R.id.alarm_item_monday), alarm.getRepetition(Alarm.ALARM_MON));
|
|
||||||
highlightDay((TextView) view.findViewById(R.id.alarm_item_tuesday), alarm.getRepetition(Alarm.ALARM_TUE));
|
|
||||||
highlightDay((TextView) view.findViewById(R.id.alarm_item_wednesday), alarm.getRepetition(Alarm.ALARM_WED));
|
|
||||||
highlightDay((TextView) view.findViewById(R.id.alarm_item_thursday), alarm.getRepetition(Alarm.ALARM_THU));
|
|
||||||
highlightDay((TextView) view.findViewById(R.id.alarm_item_friday), alarm.getRepetition(Alarm.ALARM_FRI));
|
|
||||||
highlightDay((TextView) view.findViewById(R.id.alarm_item_saturday), alarm.getRepetition(Alarm.ALARM_SAT));
|
|
||||||
|
|
||||||
isEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
alarm.setEnabled(isChecked);
|
alarm.setEnabled(isChecked);
|
||||||
@ -149,28 +119,62 @@ public class GBAlarmListAdapter extends ArrayAdapter<GBAlarm> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
view.setOnClickListener(new View.OnClickListener() {
|
holder.container.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
((ConfigureAlarms) mContext).configureAlarm(alarm);
|
((ConfigureAlarms) mContext).configureAlarm(alarm);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
alarmTime.setText(alarm.getTime());
|
holder.alarmTime.setText(alarm.getTime());
|
||||||
isEnabled.setChecked(alarm.isEnabled());
|
holder.isEnabled.setChecked(alarm.isEnabled());
|
||||||
if (alarm.isSmartWakeup()) {
|
if (alarm.isSmartWakeup()) {
|
||||||
isSmartWakeup.setVisibility(TextView.VISIBLE);
|
holder.isSmartWakeup.setVisibility(TextView.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
isSmartWakeup.setVisibility(TextView.GONE);
|
holder.isSmartWakeup.setVisibility(TextView.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return view;
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return alarmList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void highlightDay(TextView view, boolean isOn) {
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
if (isOn) {
|
|
||||||
view.setTextColor(Color.BLUE);
|
CardView container;
|
||||||
} else {
|
|
||||||
view.setTextColor(GBApplication.getTextColor(mContext));
|
TextView alarmTime;
|
||||||
|
Switch isEnabled;
|
||||||
|
TextView isSmartWakeup;
|
||||||
|
|
||||||
|
CheckedTextView alarmDayMonday;
|
||||||
|
CheckedTextView alarmDayTuesday;
|
||||||
|
CheckedTextView alarmDayWednesday;
|
||||||
|
CheckedTextView alarmDayThursday;
|
||||||
|
CheckedTextView alarmDayFriday;
|
||||||
|
CheckedTextView alarmDaySaturday;
|
||||||
|
CheckedTextView alarmDaySunday;
|
||||||
|
|
||||||
|
ViewHolder(View view) {
|
||||||
|
super(view);
|
||||||
|
|
||||||
|
container = (CardView) view.findViewById(R.id.card_view);
|
||||||
|
|
||||||
|
alarmTime = (TextView) view.findViewById(R.id.alarm_item_time);
|
||||||
|
isEnabled = (Switch) view.findViewById(R.id.alarm_item_toggle);
|
||||||
|
isSmartWakeup = (TextView) view.findViewById(R.id.alarm_smart_wakeup);
|
||||||
|
|
||||||
|
alarmDayMonday = (CheckedTextView) view.findViewById(R.id.alarm_item_monday);
|
||||||
|
alarmDayTuesday = (CheckedTextView) view.findViewById(R.id.alarm_item_tuesday);
|
||||||
|
alarmDayWednesday = (CheckedTextView) view.findViewById(R.id.alarm_item_wednesday);
|
||||||
|
alarmDayThursday = (CheckedTextView) view.findViewById(R.id.alarm_item_thursday);
|
||||||
|
alarmDayFriday = (CheckedTextView) view.findViewById(R.id.alarm_item_friday);
|
||||||
|
alarmDaySaturday = (CheckedTextView) view.findViewById(R.id.alarm_item_saturday);
|
||||||
|
alarmDaySunday = (CheckedTextView) view.findViewById(R.id.alarm_item_sunday);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:fitsSystemWindows="true"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
|
||||||
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.ConfigureAlarms">
|
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.ConfigureAlarms">
|
||||||
|
|
||||||
<ListView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:descendantFocusability="blocksDescendants"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:divider="@null"
|
||||||
android:id="@+id/alarm_list" />
|
android:id="@+id/alarm_list" />
|
||||||
</FrameLayout>
|
</RelativeLayout>
|
||||||
|
@ -1,9 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/card_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
|
card_view:cardCornerRadius="4dp"
|
||||||
|
card_view:cardElevation="4dp"
|
||||||
|
card_view:contentPadding="8dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -13,98 +23,123 @@
|
|||||||
android:id="@+id/alarm_item_time"
|
android:id="@+id/alarm_item_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_margin="8dp"
|
||||||
android:text="00:00"
|
android:text="00:00"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="(Smart)"
|
|
||||||
android:layout_toRightOf="@+id/alarm_item_time"
|
|
||||||
android:id="@+id/alarm_smart_wakeup"
|
android:id="@+id/alarm_smart_wakeup"
|
||||||
android:visibility="invisible"
|
|
||||||
android:layout_alignBaseline="@+id/alarm_item_time" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alarm_item_monday"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignBaseline="@+id/alarm_item_time"
|
||||||
android:layout_below="@+id/alarm_item_time"
|
android:layout_toEndOf="@+id/alarm_item_time"
|
||||||
android:layout_marginLeft="4dp"
|
android:text="(Smart)"
|
||||||
android:text="@string/alarm_mon_short"
|
android:visibility="invisible" />
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alarm_item_tuesday"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toRightOf="@+id/alarm_item_monday"
|
|
||||||
android:layout_below="@+id/alarm_item_time"
|
|
||||||
android:layout_marginLeft="4dp"
|
|
||||||
android:text="@string/alarm_tue_short"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alarm_item_wednesday"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toRightOf="@+id/alarm_item_tuesday"
|
|
||||||
android:layout_below="@+id/alarm_item_time"
|
|
||||||
android:layout_marginLeft="4dp"
|
|
||||||
android:text="@string/alarm_wed_short"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alarm_item_thursday"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toRightOf="@+id/alarm_item_wednesday"
|
|
||||||
android:layout_below="@+id/alarm_item_time"
|
|
||||||
android:layout_marginLeft="4dp"
|
|
||||||
android:text="@string/alarm_thu_short"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alarm_item_friday"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toRightOf="@+id/alarm_item_thursday"
|
|
||||||
android:layout_below="@+id/alarm_item_time"
|
|
||||||
android:layout_marginLeft="4dp"
|
|
||||||
android:text="@string/alarm_fri_short"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alarm_item_saturday"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toRightOf="@+id/alarm_item_friday"
|
|
||||||
android:layout_below="@+id/alarm_item_time"
|
|
||||||
android:layout_marginLeft="4dp"
|
|
||||||
android:text="@string/alarm_sat_short"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alarm_item_sunday"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toRightOf="@+id/alarm_item_saturday"
|
|
||||||
android:layout_below="@+id/alarm_item_time"
|
|
||||||
android:layout_marginLeft="4dp"
|
|
||||||
android:text="@string/alarm_sun_short"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
android:id="@+id/alarm_item_toggle"
|
android:id="@+id/alarm_item_toggle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentTop="true" />
|
android:layout_alignParentTop="true" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dowSelector"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/alarm_item_time"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckedTextView
|
||||||
|
android:id="@+id/alarm_item_monday"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableTop="?android:attr/listChoiceIndicatorMultiple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/alarm_mon_short"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckedTextView
|
||||||
|
android:id="@+id/alarm_item_tuesday"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableTop="?android:attr/listChoiceIndicatorMultiple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/alarm_tue_short"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckedTextView
|
||||||
|
android:id="@+id/alarm_item_wednesday"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableTop="?android:attr/listChoiceIndicatorMultiple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/alarm_wed_short"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckedTextView
|
||||||
|
android:id="@+id/alarm_item_thursday"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableTop="?android:attr/listChoiceIndicatorMultiple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/alarm_thu_short"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckedTextView
|
||||||
|
android:id="@+id/alarm_item_friday"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableTop="?android:attr/listChoiceIndicatorMultiple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/alarm_fri_short"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckedTextView
|
||||||
|
android:id="@+id/alarm_item_saturday"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableTop="?android:attr/listChoiceIndicatorMultiple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/alarm_sat_short"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckedTextView
|
||||||
|
android:id="@+id/alarm_item_sunday"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableTop="?android:attr/listChoiceIndicatorMultiple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/alarm_sun_short"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
|
||||||
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
</FrameLayout>
|
|
Loading…
x
Reference in New Issue
Block a user