Search in sources :

Example 1 with RxLoader

use of com.philosophicalhacker.lib.RxLoader in project gh4a by slapperwan.

the class BaseActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    setTheme(Gh4Application.THEME);
    onInitExtras(getIntent().getExtras());
    super.onCreate(savedInstanceState);
    mRxLoader = new RxLoader(this, getSupportLoaderManager());
    super.setContentView(R.layout.base_activity);
    setupSwipeToRefresh();
    setupNavigationDrawer();
    setupHeaderDrawable();
    ActionBar actionBar = getSupportActionBar();
    actionBar.setTitle(getActionBarTitle());
    actionBar.setSubtitle(getActionBarSubtitle());
    actionBar.setDisplayHomeAsUpEnabled(!IntentUtils.isNewTaskIntent(getIntent()));
    scheduleTaskDescriptionUpdate();
}
Also used : ActionBar(android.support.v7.app.ActionBar) RxLoader(com.philosophicalhacker.lib.RxLoader)

Example 2 with RxLoader

use of com.philosophicalhacker.lib.RxLoader in project gh4a by slapperwan.

the class LoadingFragmentBase method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    mRxLoader = new RxLoader(context, getLoaderManager());
}
Also used : RxLoader(com.philosophicalhacker.lib.RxLoader)

Example 3 with RxLoader

use of com.philosophicalhacker.lib.RxLoader in project gh4a by slapperwan.

the class ContentListContainerFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mRxLoader = new RxLoader(getActivity(), getLoaderManager());
    mRepository = getArguments().getParcelable("repository");
    mSelectedRef = getArguments().getString("ref");
    mStateSaved = false;
    if (savedInstanceState != null) {
        mDirStack.addAll(savedInstanceState.getStringArrayList(STATE_KEY_DIR_STACK));
        int prefixLen = STATE_KEY_CONTENT_CACHE_PREFIX.length();
        for (String key : savedInstanceState.keySet()) {
            if (key.startsWith(STATE_KEY_CONTENT_CACHE_PREFIX)) {
                String cacheKey = key.substring(prefixLen);
                if (cacheKey.equals("/")) {
                    cacheKey = null;
                }
                ArrayList<Content> content = savedInstanceState.getParcelableArrayList(key);
                mContentCache.put(cacheKey, content);
            }
        }
        mInitialPathToLoad = savedInstanceState.getStringArrayList(STATE_KEY_INITIAL_PATH);
    } else {
        mDirStack.push("");
        String initialPath = getArguments().getString("initialpath");
        if (initialPath != null) {
            mInitialPathToLoad = new ArrayList<>();
            int pos = initialPath.indexOf("/");
            while (pos > 0) {
                mInitialPathToLoad.add(initialPath.substring(0, pos));
                pos = initialPath.indexOf("/", pos + 1);
            }
            mInitialPathToLoad.add(initialPath);
        }
    }
}
Also used : Content(com.meisolsson.githubsdk.model.Content) RxLoader(com.philosophicalhacker.lib.RxLoader)

Example 4 with RxLoader

use of com.philosophicalhacker.lib.RxLoader in project gh4a by slapperwan.

the class PagedDataBaseFragment method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    setContentShown(false);
    mRxLoader = new RxLoader(getActivity(), getLoaderManager());
    resetSubject();
    load(false);
}
Also used : RxLoader(com.philosophicalhacker.lib.RxLoader)

Aggregations

RxLoader (com.philosophicalhacker.lib.RxLoader)4 ActionBar (android.support.v7.app.ActionBar)1 Content (com.meisolsson.githubsdk.model.Content)1