Author Topic: Brainstorming Version 3.0  (Read 77815 times)

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Brainstorming Version 3.0
« Reply #315 on: March 01, 2015, 05:08:50 PM »
The current GalleryActivity is a proof-of-concept for working with the game data and other backend machinery.  But it shouldn't inhibit the ultimate design.  As you say, there are various pros and cons to subclassing different built-in android classes, and those should be explored freely.  My guess is that the best gallery implementation will evolve largely from the ground up after taking account of the overarching design goals and requirements.

I know memory management for the loaded bitmaps could be important, and the current stand-in does nothing about that.  I don't know all the options available, but I have heard RecyclerView mentioned more than once on these forums, as a possible starting point.

Deriving from PreferenceActivity is handy and streamlines development for certain types of UIs like SettingsGlobalActivity, which don't need to be fancy but should be easy to maintain and extend.  A version 3 GalleryActivity doesn't seem like a good fit for subclassing PreferenceActivity, so I certainly would not let that constrain you.  The NativeActivity is only subclassed for the Xperia Play variant of the GameActivity, since that is the only way to access that device's touchpad input.  I don't see any need to change anything in the GameActivity, at least for the time being.  The nice thing about the current design is that the activities are well decoupled, so the GalleryActivity can be developed in pretty much complete isolation.  So I say focus on a new GalleryActiivity.

The PlayMenuActivity is also not set in stone, and should be seen as subordinate to the design of the GalleryActivity.  I.e. PlayMenuActivity currently provides complementary game-specific functionality not found in the current GalleryActivity.  Feel free to move functionality between PlayMenuActivity and GalleryActivity, as you ponder the best design for GalleryActivity.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline BonzaiThePenguin

  • byte
  • *
  • Posts: 24
    • View Profile
Re: Brainstorming Version 3.0
« Reply #316 on: March 03, 2015, 12:22:51 AM »
My bad, I thought we were updating the ActionBar stuff as part of the new UI commit (see: previous post) so I switched the global application theme over to AppCompat and started updating the existing Activities. The new commit only sets the AppCompat theme for GalleryActivity and leaves everything else alone.

Code: [Select]
super.setTheme( android.support.v7.appcompat.R.style.Theme_AppCompat );

Offline BonzaiThePenguin

  • byte
  • *
  • Posts: 24
    • View Profile
Re: Brainstorming Version 3.0
« Reply #317 on: March 03, 2015, 03:17:35 AM »
Alright, the changes are all implemented. Added a search field and switched to RecyclerView so only the visible thumbnails will be loaded into memory rather than all of them. The ... next to each thumbnail is a stub for now, since I don't know what you want to put in the contextual menu. Tapping a thumbnail still takes you to the options menu instead of directly to gameplay. Also haven't implemented the "Recently played" section yet.

https://github.com/mupen64plus-ae/mupen64plus-ae/tree/New-Gallery-UI

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Brainstorming Version 3.0
« Reply #318 on: March 03, 2015, 06:57:46 AM »
Thanks, keep up the great progress!

Just to clarify, I don't object to updating the GameActivity as well -- my point was just that GalleryActivity and GameActivity are almost completely independent, so they can be done in isolation.  GameActivity is also a little thornier since it has to deal with native code and lots of subtle lifecycle gotchas.  My suggestion is just to focus on one thing at a time rather than getting spread too thin.

I'll take a look at the new stuff now!
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline BonzaiThePenguin

  • byte
  • *
  • Posts: 24
    • View Profile
Re: Brainstorming Version 3.0
« Reply #319 on: March 03, 2015, 04:09:58 PM »
IIRC I was updating pretty much everything except GameActivity. Maybe I updated that too, I forget. But yeah I agree there were too many changes being made. I was mostly experimenting with a bunch of changes, but the changes to Toolbar across the entire codebase were meant to be a single commit.

Probably goes without saying, but feel free to make any changes you want to the New-Gallery-UI branch. I'm not going to submit it as a PR until it's a 100% replacement for the old gallery view, which right now it would be if not for the nonfunctional ... views next to each thumbnail.

Offline BonzaiThePenguin

  • byte
  • *
  • Posts: 24
    • View Profile
Re: Brainstorming Version 3.0
« Reply #320 on: March 03, 2015, 06:26:24 PM »
Ended up implementing the contextual menu and the functionality for going directly to gameplay. For some reason sometimes after exiting the game it immediately resumes the game again, while other times it exits correctly. Haven't yet figured out why it does that.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Brainstorming Version 3.0
« Reply #321 on: March 04, 2015, 07:48:23 AM »
Holy crap, this new UI is awesome!!!  :o ;D 8)

I am getting a few crashes but shouldn't be too hard to track down.  now that I know how to build with the new appcompat stuff, I can go back and give it a thorough review commit-by-commit.

Keep up the great work!
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: Brainstorming Version 3.0
« Reply #322 on: March 04, 2015, 12:23:58 PM »
Is it "context sensitive"?
Sensitive to context?
Do you press B when it tings,makes a ting noise? *ting*
A ting like that...ting noise!

Sorry,couldn't resist. ;D

Can anyone please get screenshots of it?,I wanna know what it looks like.

Offline xperia64

  • Moderator
  • double
  • *****
  • Posts: 591
    • View Profile
    • My Apps
Re: Brainstorming Version 3.0
« Reply #323 on: March 04, 2015, 04:58:26 PM »


Only complaint I have so far is that it's a bit jerky at times when scrolling. Is it dynamically loading images?

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Brainstorming Version 3.0
« Reply #324 on: March 04, 2015, 05:19:23 PM »
Yes, it's using the RecyclerView component to cap the RAM usage for the cover art.  So when you scroll the bitmaps are being loaded/unloaded presumably.  This is a standard component so the behavior should be documented somewhere.  There may be some knobs to adjust.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline BonzaiThePenguin

  • byte
  • *
  • Posts: 24
    • View Profile
Re: Brainstorming Version 3.0
« Reply #325 on: March 04, 2015, 05:58:34 PM »
Glad you like it! I pretty much scrapped the 2013 mockup since I figured that was back in the wild west days of Android UI design, where they were still looking for their identity. These days you just need to slap in the material theme and you're good to go.

RecyclerView has some configuration options associated with it, but I haven't touched that part at all. You can change how many additional off-screen views to allow before it starts recycling them (resulting in better scrolling performance at the cost of using additional RAM), and ways to tell the view which optimizations it can make. Also you probably noticed there's no scrollbar apparently there's something special you need to do to add support for that, but again haven't looked into it.

Offline BonzaiThePenguin

  • byte
  • *
  • Posts: 24
    • View Profile
Re: Brainstorming Version 3.0
« Reply #326 on: March 06, 2015, 03:40:01 AM »
Here's what the latest version looks like:








Offline Metalmusic3000

  • byte
  • *
  • Posts: 46
    • View Profile
Re: Brainstorming Version 3.0
« Reply #327 on: March 06, 2015, 10:06:49 AM »
Will this be a part of the next alpha?

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Brainstorming Version 3.0
« Reply #328 on: March 06, 2015, 10:15:36 AM »
We're working on it, but yes the goal is to have it in one of the next alphas.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Brainstorming Version 3.0
« Reply #329 on: March 07, 2015, 09:09:44 AM »
I wonder how many people with FROYO (API 7) will use Version 3?  Would be nice to eliminate the IS_GINGERBREAD (API 9) checks from the code.

It would be really nice to be able to bump to HONEYCOMB_MR2 (API 12), as that would cut way down on the API-specific branch points.  But I'm guessing there are still a sizeable number of GB users out there.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version