Add control_set_clear_button

pull/384/head
Alex Baker 9 years ago
parent e0f17708b0
commit e14eb786bc

@ -80,7 +80,7 @@ public class FilesControlSet extends TaskEditControlSetBase {
showFile(taskAttachment);
}
});
View clearFile = fileRow.findViewById(R.id.remove_file);
View clearFile = fileRow.findViewById(R.id.clear);
clearFile.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {

@ -67,7 +67,7 @@ public class GCalControlSet extends TaskEditControlSetBase implements CalendarSe
protected void afterInflate() {
View view = getView();
calendar = (TextView) view.findViewById(R.id.calendar_display_which);
cancelButton = (ImageView) view.findViewById(R.id.clear_calendar);
cancelButton = (ImageView) view.findViewById(R.id.clear);
calendar.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {

@ -180,7 +180,7 @@ public class HideUntilControlSet extends TaskEditControlSetBase implements OnIte
@Override
protected void afterInflate() {
textDisplay = (TextView) getView().findViewById(R.id.display_row_edit);
clearButton = (ImageView) getView().findViewById(R.id.clear_hide_date);
clearButton = (ImageView) getView().findViewById(R.id.clear);
clearButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {

@ -149,7 +149,7 @@ public class ReminderControlSet extends TaskEditControlSetBase implements Adapte
alertItem.setTag(timestamp);
TextView display = (TextView) alertItem.findViewById(R.id.alarm_string);
display.setText(text);
alertItem.findViewById(R.id.button1).setOnClickListener(new OnClickListener() {
alertItem.findViewById(R.id.clear).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
alertContainer.removeView(alertItem);

@ -161,7 +161,7 @@ public class DeadlineControlSet extends TaskEditControlSetBase {
@Override
protected void afterInflate() {
View view = getView();
clearButton = view.findViewById(R.id.clear_due_date);
clearButton = view.findViewById(R.id.clear);
clearButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

@ -27,21 +27,6 @@
</LinearLayout>
<ImageView
android:id="@+id/button1"
android:src="@drawable/ic_cancel_24dp"
android:tint="?attr/icon_tint"
android:layout_gravity="center"
android:contentDescription="@android:string/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:alpha="@dimen/drawer_icon_alpha"
android:paddingStart="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingEnd="10dp" />
<include layout="@layout/control_set_clear_button" />
</LinearLayout>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clear"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:alpha="@dimen/drawer_icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:paddingEnd="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingStart="10dp"
android:src="@drawable/ic_cancel_24dp"
android:tint="?attr/icon_tint" />

@ -27,22 +27,6 @@
</LinearLayout>
<ImageView
android:id="@+id/clear_due_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:alpha="@dimen/drawer_icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@android:string/cancel"
android:paddingEnd="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingStart="10dp"
android:src="@drawable/ic_cancel_24dp"
android:tint="?attr/icon_tint"
android:visibility="gone" />
<include layout="@layout/control_set_clear_button" />
</LinearLayout>

@ -25,21 +25,6 @@
</LinearLayout>
<ImageView
android:id="@+id/clear_calendar"
android:src="@drawable/ic_cancel_24dp"
android:tint="?attr/icon_tint"
android:layout_gravity="center"
android:contentDescription="@android:string/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:alpha="@dimen/drawer_icon_alpha"
android:paddingStart="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingEnd="10dp" />
<include layout="@layout/control_set_clear_button" />
</LinearLayout>

@ -30,22 +30,6 @@
</LinearLayout>
<ImageView
android:id="@+id/clear_hide_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:alpha="@dimen/drawer_icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@android:string/cancel"
android:paddingEnd="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingStart="10dp"
android:src="@drawable/ic_cancel_24dp"
android:tint="?attr/icon_tint"
android:visibility="gone" />
<include layout="@layout/control_set_clear_button" />
</LinearLayout>

@ -18,19 +18,6 @@
android:layout_weight="100"
android:textColor="?attr/asTextColor" />
<ImageView
android:id="@+id/remove_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:clickable="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:alpha="@dimen/drawer_icon_alpha"
android:paddingEnd="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingStart="10dp"
android:src="@drawable/ic_cancel_24dp"
android:tint="?attr/icon_tint" />
<include layout="@layout/control_set_clear_button" />
</LinearLayout>

Loading…
Cancel
Save