Search in sources :

Example 21 with BottomNavigationView

use of android.support.design.widget.BottomNavigationView in project atlas by alibaba.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    mTextMessage = (TextView) findViewById(R.id.message);
    BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
    navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
}
Also used : BottomNavigationView(android.support.design.widget.BottomNavigationView)

Example 22 with BottomNavigationView

use of android.support.design.widget.BottomNavigationView in project Android-NDK-Simples by cheng2016.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    mTextMessage = (TextView) findViewById(R.id.message);
    BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
    navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
}
Also used : BottomNavigationView(android.support.design.widget.BottomNavigationView)

Example 23 with BottomNavigationView

use of android.support.design.widget.BottomNavigationView in project Tools-For-Android-Development by hatanvir.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main2);
    mTextMessage = (TextView) findViewById(R.id.message);
    BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
    navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
}
Also used : BottomNavigationView(android.support.design.widget.BottomNavigationView)

Example 24 with BottomNavigationView

use of android.support.design.widget.BottomNavigationView in project Pepper_v0 by SamDaQueen.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    // MobileAds.initialize(this, "ca-app-pub-4677501330220530~1273349880");
    // loading the default fragment
    loadFragment(new CategoryFragment());
    BottomNavigationView navigation = findViewById(R.id.navigation);
    navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
    Bundle bundle = getIntent().getBundleExtra("items");
    if (bundle != null) {
        arrayList = bundle.getParcelableArrayList("order");
        if (arrayList != null && !arrayList.isEmpty())
            for (// a foreach loop
            com.mukess.android.pepper.MenuItem menuItem : // a foreach loop
            arrayList) if (menuItem.getQuantity() != 0)
                finalArrayList.add(menuItem);
    }
    // Firebase Authentication
    mUsername = ANONYMOUS;
    mFirebaseAuth = FirebaseAuth.getInstance();
    mAuthStateListener = new FirebaseAuth.AuthStateListener() {

        @Override
        public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
            FirebaseUser user = firebaseAuth.getCurrentUser();
            if (user != null) {
                // user signed in
                onSignedInInitialize(user.getDisplayName());
            } else {
                // user signed out
                onSignedOutCleanup();
                startActivityForResult(AuthUI.getInstance().createSignInIntentBuilder().setIsSmartLockEnabled(false).setAvailableProviders(Arrays.asList(new AuthUI.IdpConfig.GoogleBuilder().build(), new AuthUI.IdpConfig.EmailBuilder().build(), new AuthUI.IdpConfig.PhoneBuilder().build())).setLogo(R.drawable.pepper_500px).build(), RC_SIGN_IN);
            }
        }
    };
}
Also used : Bundle(android.os.Bundle) MenuItem(android.view.MenuItem) FirebaseUser(com.google.firebase.auth.FirebaseUser) BottomNavigationView(android.support.design.widget.BottomNavigationView) FirebaseAuth(com.google.firebase.auth.FirebaseAuth)

Aggregations

BottomNavigationView (android.support.design.widget.BottomNavigationView)24 View (android.view.View)8 MenuItem (android.view.MenuItem)6 FragmentTransaction (android.support.v4.app.FragmentTransaction)5 Bundle (android.os.Bundle)4 NavigationView (android.support.design.widget.NavigationView)3 UiController (android.support.test.espresso.UiController)3 ViewAction (android.support.test.espresso.ViewAction)3 BindView (butterknife.BindView)3 SearchManager (android.app.SearchManager)2 Intent (android.content.Intent)2 Handler (android.os.Handler)2 Fragment (android.support.v4.app.Fragment)2 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)2 RecyclerView (android.support.v7.widget.RecyclerView)2 SearchView (android.support.v7.widget.SearchView)2 Toolbar (android.support.v7.widget.Toolbar)2 Menu (android.view.Menu)2 ViewTreeObserver (android.view.ViewTreeObserver)2 TextView (android.widget.TextView)2