mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Delete right button
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
447e6fd7ee
commit
5087ff4537
2 changed files with 0 additions and 57 deletions
|
@ -29,7 +29,6 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.BaseExpandableListAdapter;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
@ -333,40 +332,6 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
|||
}
|
||||
statusTextView.setText(status);
|
||||
|
||||
/// bind listeners to perform actions
|
||||
/// bind listeners to perform actions
|
||||
ImageButton rightButton = (ImageButton) view.findViewById(R.id.upload_right_button);
|
||||
if (upload.getUploadStatus() == UploadStatus.UPLOAD_IN_PROGRESS) {
|
||||
//Cancel
|
||||
rightButton.setImageResource(R.drawable.ic_action_cancel_grey);
|
||||
rightButton.setVisibility(View.VISIBLE);
|
||||
rightButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
FileUploader.FileUploaderBinder uploaderBinder = mParentActivity.getFileUploaderBinder();
|
||||
if (uploaderBinder != null) {
|
||||
uploaderBinder.cancel(upload);
|
||||
refreshView();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
} else if (upload.getUploadStatus() == UploadStatus.UPLOAD_FAILED) {
|
||||
//Delete
|
||||
rightButton.setImageResource(R.drawable.ic_action_delete_grey);
|
||||
rightButton.setVisibility(View.VISIBLE);
|
||||
rightButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mUploadsStorageManager.removeUpload(upload);
|
||||
refreshView();
|
||||
}
|
||||
});
|
||||
|
||||
} else { // UploadStatus.UPLOAD_SUCCESS
|
||||
rightButton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
view.setOnClickListener(null);
|
||||
|
||||
/// Set icon or thumbnail
|
||||
|
|
|
@ -102,26 +102,4 @@
|
|||
android:textSize="@dimen/upload_list_item_text_size_independent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="@dimen/min_list_item_size"
|
||||
android:layout_height="@dimen/standard_list_item_size"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/standard_half_padding"
|
||||
>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/upload_right_button"
|
||||
android:layout_width="@dimen/upload_list_item_image_size"
|
||||
android:layout_height="@dimen/upload_list_item_image_size"
|
||||
android:layout_gravity="center"
|
||||
android:background="@android:color/transparent"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Reference in a new issue