Search in sources :

Example 6 with HummingbirdApi

use of tr.bcxip.hummingbird.api.HummingbirdApi in project Hummingbird-for-Android by xiprox.

the class FeedFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    context = getActivity();
    api = new HummingbirdApi(context);
    prefMan = new PrefManager(context);
    try {
        parent = (ProfileFragment) getFragmentManager().findFragmentByTag(ProfileFragment.FRAGMENT_TAG_PROFILE);
    } catch (Exception e) {
    /* empty */
    }
}
Also used : HummingbirdApi(tr.bcxip.hummingbird.api.HummingbirdApi) PrefManager(tr.bcxip.hummingbird.managers.PrefManager)

Example 7 with HummingbirdApi

use of tr.bcxip.hummingbird.api.HummingbirdApi in project Hummingbird-for-Android by xiprox.

the class LibraryTabFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    context = getActivity();
    api = new HummingbirdApi(context);
    prefMan = new PrefManager(context);
    USERNAME = getArguments().getString(ARG_USERNAME);
    AUTH_TOKEN = prefMan.getAuthToken();
}
Also used : HummingbirdApi(tr.bcxip.hummingbird.api.HummingbirdApi) PrefManager(tr.bcxip.hummingbird.managers.PrefManager)

Example 8 with HummingbirdApi

use of tr.bcxip.hummingbird.api.HummingbirdApi in project Hummingbird-for-Android by xiprox.

the class LoginActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    api = new HummingbirdApi(this);
    prefMan = new PrefManager(this);
    mUsername = (EditText) findViewById(R.id.edit_username);
    mPassword = (EditText) findViewById(R.id.edit_password);
    mSignIn = (Button) findViewById(R.id.btn_login);
    mSignUp = (Button) findViewById(R.id.btn_new);
    mHelp = (Button) findViewById(R.id.btn_help);
    mErrorMessage = (TextView) findViewById(R.id.error_text);
    mProgressBar = (ProgressBar) findViewById(R.id.login_progress_bar);
    mSignIn.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            new AuthenticationTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
        }
    });
    mSignUp.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            sendLink(2);
        }
    });
    mHelp.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            sendLink(1);
        }
    });
    mUsername.addTextChangedListener(new TextWatcher() {

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        /* empty */
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        /* empty */
        }

        @Override
        public void afterTextChanged(Editable editable) {
            updateState();
        }
    });
    mPassword.addTextChangedListener(new TextWatcher() {

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        /* empty */
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        /* empty */
        }

        @Override
        public void afterTextChanged(Editable editable) {
            updateState();
        }
    });
}
Also used : HummingbirdApi(tr.bcxip.hummingbird.api.HummingbirdApi) TextWatcher(android.text.TextWatcher) Editable(android.text.Editable) TextView(android.widget.TextView) View(android.view.View) PrefManager(tr.bcxip.hummingbird.managers.PrefManager)

Example 9 with HummingbirdApi

use of tr.bcxip.hummingbird.api.HummingbirdApi in project Hummingbird-for-Android by xiprox.

the class NavigationDrawerFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    context = getActivity();
    api = new HummingbirdApi(context);
    prefMan = new PrefManager(context);
    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity());
    mUserLearnedDrawer = sp.getBoolean(PREF_USER_LEARNED_DRAWER, false);
    if (savedInstanceState != null) {
        mCurrentSelectedPosition = savedInstanceState.getInt(STATE_SELECTED_POSITION);
        mFromSavedInstanceState = true;
    }
}
Also used : SharedPreferences(android.content.SharedPreferences) HummingbirdApi(tr.bcxip.hummingbird.api.HummingbirdApi) PrefManager(tr.bcxip.hummingbird.managers.PrefManager)

Aggregations

HummingbirdApi (tr.bcxip.hummingbird.api.HummingbirdApi)9 PrefManager (tr.bcxip.hummingbird.managers.PrefManager)8 TargetApi (android.annotation.TargetApi)2 View (android.view.View)2 TextView (android.widget.TextView)2 SharedPreferences (android.content.SharedPreferences)1 Outline (android.graphics.Outline)1 ColorDrawable (android.graphics.drawable.ColorDrawable)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 SearchView (android.support.v7.widget.SearchView)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