mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 05:13:53 +01:00
* resolved issue #2542 * removed commented code
This commit is contained in:
parent
d719a4a9d4
commit
38dceddbf5
4 changed files with 17 additions and 66 deletions
|
|
@ -109,9 +109,7 @@ public class UploadActivity extends BaseActivity implements UploadView, SimilarI
|
|||
@BindView(R.id.license_subtitle) TextView licenseSubtitle;
|
||||
@BindView(R.id.please_wait_text_view) TextView pleaseWaitTextView;
|
||||
|
||||
//Right Card
|
||||
@BindView(R.id.right_card) CardView rightCard;
|
||||
@BindView(R.id.right_card_expand_button) ImageView rightCardExpandButton;
|
||||
|
||||
@BindView(R.id.right_card_map_button) View rightCardMapButton;
|
||||
|
||||
// Category Search
|
||||
|
|
@ -325,7 +323,7 @@ public class UploadActivity extends BaseActivity implements UploadView, SimilarI
|
|||
|
||||
@Override
|
||||
public void setRightCardVisibility(boolean visible) {
|
||||
rightCard.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
rightCardMapButton.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -358,12 +356,6 @@ public class UploadActivity extends BaseActivity implements UploadView, SimilarI
|
|||
updateCardState(state, bottomCardExpandButton, rvDescriptions, previous, next, bottomCardAddDescription);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRightCardState(boolean state) {
|
||||
rightCardExpandButton.animate().rotation(rightCardExpandButton.getRotation() + (state ? -180 : 180)).start();
|
||||
//Add all items in rightCard here
|
||||
rightCardMapButton.setVisibility(state ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBackground(Uri mediaUri) {
|
||||
|
|
@ -530,7 +522,6 @@ public class UploadActivity extends BaseActivity implements UploadView, SimilarI
|
|||
}
|
||||
|
||||
private void configureRightCard() {
|
||||
rightCardExpandButton.setOnClickListener(v -> presenter.toggleRightCardState());
|
||||
rightCardMapButton.setOnClickListener(v -> presenter.openCoordinateMap());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -262,14 +262,6 @@ public class UploadPresenter {
|
|||
view.setBottomCardState(uploadModel.isBottomCardState());
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the right card's state between open and closed.
|
||||
*/
|
||||
void toggleRightCardState() {
|
||||
uploadModel.setRightCardState(!uploadModel.isRightCardState());
|
||||
view.setRightCardState(uploadModel.isRightCardState());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets all the cards' states to closed.
|
||||
*/
|
||||
|
|
@ -280,7 +272,6 @@ public class UploadPresenter {
|
|||
}
|
||||
if (uploadModel.isRightCardState()) {
|
||||
uploadModel.setRightCardState(false);
|
||||
view.setRightCardState(false);
|
||||
}
|
||||
if (uploadModel.isBottomCardState()) {
|
||||
uploadModel.setBottomCardState(false);
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ public interface UploadView {
|
|||
|
||||
void setBottomCardState(boolean state);
|
||||
|
||||
void setRightCardState(boolean bottomCardState);
|
||||
|
||||
void setBackground(Uri mediaUri);
|
||||
|
||||
void setTopCardVisibility(boolean visible);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue