-
- Downloads
Basic attach activity (no style)
- app/build.gradle 1 addition, 0 deletionsapp/build.gradle
- app/src/main/AndroidManifest.xml 2 additions, 0 deletionsapp/src/main/AndroidManifest.xml
- app/src/main/java/com/commit451/gitlab/activity/AttachActivity.java 115 additions, 0 deletions...in/java/com/commit451/gitlab/activity/AttachActivity.java
- app/src/main/java/com/commit451/gitlab/activity/IssueActivity.java 11 additions, 12 deletions...ain/java/com/commit451/gitlab/activity/IssueActivity.java
- app/src/main/java/com/commit451/gitlab/fragment/MergeRequestDiscussionFragment.java 2 additions, 3 deletions...it451/gitlab/fragment/MergeRequestDiscussionFragment.java
- app/src/main/java/com/commit451/gitlab/model/api/FileUploadResponse.java 4 additions, 4 deletions...va/com/commit451/gitlab/model/api/FileUploadResponse.java
- app/src/main/java/com/commit451/gitlab/navigation/Navigator.java 4 additions, 8 deletions.../main/java/com/commit451/gitlab/navigation/Navigator.java
- app/src/main/java/com/commit451/gitlab/util/FileUtil.java 6 additions, 0 deletionsapp/src/main/java/com/commit451/gitlab/util/FileUtil.java
- app/src/main/res/layout/activity_attach.xml 52 additions, 0 deletionsapp/src/main/res/layout/activity_attach.xml
- app/src/main/res/values/strings.xml 1 addition, 0 deletionsapp/src/main/res/values/strings.xml
-
Just out of curiosity - why did you use a separate Activity for achieving this? Why didn't you use an Fragment (typical use case, since it's not occupying the whole screen) - or nothing at all (the code could have been implemented in the already existing Activity, and then it could have maybe extended some functionality into some other class)? Using a whole activity to display what is essentially a dialog or a menu seems redundant. I'm not saying that what's done is wrong, I'm just wondering why.
-
Hey @aleksandar-stefanovic I tend to use Activities over Fragments wherever possible due to the fact that I find fragments pretty limiting. With an activity, you can usually achieve more custom animations and transitions. I also made it it's own activity so that both the Merge Request and Issue activities could use it easily and it would "just work" without having to potentially duplicate code in both activities. It probably could be achieved also with a BottomSheetDialogFragment or something similar, but when using an Activity, we could easily refactor it to look like a dialog, a full screen activity, or whatever else without having to do much work.
-
Okay, I understand... can I submit a merge request that adds a library to the project? I've added a circular reveal animation to the "attachment" CardView that pops up, but I had to add this lib for compat reasons (API 14 vs API 21 in stock). Or, I could keep it >=API 21 alternatively... This circular reveal animation can be also used elsewhere in the project, it's simple to implement... video: https://www.youtube.com/watch?v=SCdNjPxnlOM
Edited by username-removed-167252