nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.19k stars 1.75k forks source link

Use fragments instead of new activities #5480

Open mgrddsj opened 4 years ago

mgrddsj commented 4 years ago

Steps to reproduce

  1. Open navigation drawer
  2. Opening "Activities", "Notifications", "Auto Upload", "Uploads", and "Deleted files"

Expected behaviour

Opening the feature in the same activity (com.owncloud.android.ui.activity.FileDisplayActivity), just switch the fragment, like opening "Favorites", "Photos", etc.

Actual behaviour

Opens the feature in a new activity, and shows an animation of opening a new activity.

Environment data

Android version: Android 9

Device model: OnePlus 5 (ONEPLUS A5000)

Stock or customized system: Stock-like H2OS 9.0.7 (Preinstalled on Chinese models of OnePlus Phones, similar to Oxygen OS)

Nextcloud app version: 3.10.1 from Play Store

Nextcloud server version: 17.0.3

Logs

Web server error log

(Not server related problem.)

Nextcloud log (data/nextcloud.log)

(App not crashed, just an user experience enhancement.)

tobiasKaminsky commented 4 years ago

Thanks for your suggestion, but this is not a bug. We decided it "back then" to have a separate activity, to not run into problems as FileDisplayActivity would be then always the one big activity. But sure, there is room for improvement.

If you want to help us, please first describe what and how you want to do it, as this touches central parts of our app.

mario commented 4 years ago

I kindof agree with @mgrddsj, but I also agree with @tobiasKaminsky that this is an architectural change/improvement (and a rather large one at that) rather than a bug.

@tobiasKaminsky activity is a simple container - no need for it to be big.

mgrddsj commented 4 years ago

Yes, I knew it is an enhancement, I just didn't find a way to remove the bug tag. It is indeed a large architectural change, and I'm still learning Android development, so I guess I can't help with this issue.

I also advise to change the animation of opening the new activity to fade as a temporary fix, so that the visual experience is relatively better.

tobiasKaminsky commented 4 years ago

I also advise to change the animation of opening the new activity to fade as a temporary fix, so that the visual experience is relatively better.

This is a nice quick win, good idea :+1:

tobiasKaminsky commented 4 years ago

@tobiasKaminsky activity is a simple container - no need for it to be big.

True, but currently FDA is very big…so we would have to change this.