Remove delete icon on download item
This commit is contained in:
1 parent
727eb73721
commit
7c235d2a33
3 files changed
+13
-42
No files matched your search
@@ -1021,7 +1021,6 @@ public class DownloadsScene extends ToolbarScene
|
||||
public final TextView category;
|
||||
public final View start;
|
||||
public final View stop;
|
||||
public final View delete;
|
||||
public final TextView state;
|
||||
public final ProgressBar progressBar;
|
||||
public final TextView percent;
|
||||
@@ -1037,7 +1036,6 @@ public class DownloadsScene extends ToolbarScene
|
||||
category = (TextView) itemView.findViewById(R.id.category);
|
||||
start = itemView.findViewById(R.id.start);
|
||||
stop = itemView.findViewById(R.id.stop);
|
||||
delete = itemView.findViewById(R.id.delete);
|
||||
state = (TextView) itemView.findViewById(R.id.state);
|
||||
progressBar = (ProgressBar) itemView.findViewById(R.id.progress_bar);
|
||||
percent = (TextView) itemView.findViewById(R.id.percent);
|
||||
@@ -1047,10 +1045,8 @@ public class DownloadsScene extends ToolbarScene
|
||||
thumb.setOnClickListener(this);
|
||||
start.setOnClickListener(this);
|
||||
stop.setOnClickListener(this);
|
||||
delete.setOnClickListener(this);
|
||||
RippleSalon.addRipple(start, false);
|
||||
RippleSalon.addRipple(stop, false);
|
||||
RippleSalon.addRipple(delete, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1089,16 +1085,6 @@ public class DownloadsScene extends ToolbarScene
|
||||
if (null != mDownloadManager) {
|
||||
mDownloadManager.stopDownload(list.get(index).gid);
|
||||
}
|
||||
} else if (delete == v) {
|
||||
GalleryInfo galleryInfo = list.get(index);
|
||||
CheckBoxDialogBuilder builder = new CheckBoxDialogBuilder(context,
|
||||
getString(R.string.download_remove_dialog_message, EhUtils.getSuitableTitle(galleryInfo)),
|
||||
getString(R.string.download_remove_dialog_check_text),
|
||||
Settings.getRemoveImageFiles());
|
||||
DeleteDialogHelper helper = new DeleteDialogHelper(galleryInfo, builder);
|
||||
builder.setTitle(R.string.download_remove_dialog_title)
|
||||
.setPositiveButton(android.R.string.ok, helper)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,44 +70,29 @@
|
||||
android:textColor="@android:color/white"
|
||||
android:textAllCaps="true"/>
|
||||
|
||||
<LinearLayout
|
||||
<FrameLayout
|
||||
android:id="@+id/actions"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/thumb"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingRight="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/start"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/v_play_x24"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/stop"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/v_pause_x24"/>
|
||||
|
||||
</FrameLayout>
|
||||
android:paddingRight="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/delete"
|
||||
android:id="@+id/start"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/v_close_x24"/>
|
||||
app:srcCompat="@drawable/v_play_x24"/>
|
||||
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/stop"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/v_pause_x24"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/state"
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
style="@style/Widget.Design.FloatingActionButton.Mini"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:srcCompat="@drawable/v_close_dark_x24"
|
||||
app:srcCompat="@drawable/v_delete_dark_x24"
|
||||
app:backgroundTint="?attr/colorPrimary"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
|
||||
Reference in new issue
Block a user