Search in sources :

Example 11 with PrefManager

use of tr.bcxip.hummingbird.managers.PrefManager in project Hummingbird-for-Android by xiprox.

the class ProfileFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    context = getActivity();
    prefMan = new PrefManager(context);
    /*
         * Check if any username is passed to the fragment. If passed, load data for that user;
         * if not, load for the currently logged in user.
         */
    if (getArguments() != null) {
        String receivedUsername = getArguments().getString(ARG_USERNAME);
        if (receivedUsername != null && !receivedUsername.equals("") && !receivedUsername.trim().equals(""))
            username = receivedUsername;
        else
            username = prefMan.getUsername();
    } else
        username = prefMan.getUsername();
}
Also used : PrefManager(tr.bcxip.hummingbird.managers.PrefManager)

Aggregations

PrefManager (tr.bcxip.hummingbird.managers.PrefManager)11 HummingbirdApi (tr.bcxip.hummingbird.api.HummingbirdApi)8 View (android.view.View)2 TextView (android.widget.TextView)2 TargetApi (android.annotation.TargetApi)1 Intent (android.content.Intent)1 SharedPreferences (android.content.SharedPreferences)1 Outline (android.graphics.Outline)1 ColorDrawable (android.graphics.drawable.ColorDrawable)1 Bundle (android.os.Bundle)1 Editable (android.text.Editable)1 TextWatcher (android.text.TextWatcher)1 Transition (android.transition.Transition)1 ViewOutlineProvider (android.view.ViewOutlineProvider)1 ViewTreeObserver (android.view.ViewTreeObserver)1 AdapterView (android.widget.AdapterView)1 ImageView (android.widget.ImageView)1 Anime (tr.bcxip.hummingbird.api.objects.Anime)1 LibraryEntry (tr.bcxip.hummingbird.api.objects.LibraryEntry)1 ObservableScrollView (tr.bcxip.hummingbird.widget.ObservableScrollView)1