Manage multiple actions in an android application

I have an android app with lots of action. I am doing the following action from the previous one, creating an Intent object directly in its code. I think that code sucks. Are there any “good” ways to implement event management in the application, best practices?

+5
source share
3 answers

In fact, there are some standard methods that we develop with an Android developer:

  • Create a DashBoard and start the action based on a specific control panel option.
  • Follow tab setting

About Toolbar

enter image description here

Dashboard .

TabBar: Tabbar? , , ActivityGroup .

+4

Android . "". .

, Fragments ActivityGroups. , , Intents .

0

, 4 , :

[ C] ↔ D ↔ A ↔ B ↔ C ↔ [Next to D]

, 4- , next/prev.

ActivityOrderer, Class : next prev. , :

public static Class<?> nextActivityClass(Class<?> current) {
    int currentIndex = _orderedActivities.indexOf(current);
    int nextIndex = (currentIndex + 1) % _orderedActivities.size();
    return _orderedActivities.get(nextIndex);
}

, , TitleBar next prev Intent, :

_titleBar.setNextIntent(new Intent(this, ActivityOrderer.nextActivityClass(getClass())));
0
source

All Articles