Delete right button

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-07-01 19:46:59 +02:00 committed by AndyScherzinger
parent 447e6fd7ee
commit 5087ff4537
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 0 additions and 57 deletions

View file

@ -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

View file

@ -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>