Search in sources :

Example 11 with FragmentIndex

use of it.neokree.example.mockedFragments.FragmentIndex in project MaterialNavigationDrawer by neokree.

the class KitkatStatusBar method init.

@Override
public void init(Bundle savedInstanceState) {
    // add accounts
    MaterialAccount account = new MaterialAccount(this.getResources(), "NeoKree", "neokree@gmail.com", R.drawable.photo, R.drawable.bamboo);
    this.addAccount(account);
    MaterialAccount account2 = new MaterialAccount(this.getResources(), "Hatsune Miky", "hatsune.miku@example.com", R.drawable.photo2, R.drawable.mat2);
    this.addAccount(account2);
    MaterialAccount account3 = new MaterialAccount(this.getResources(), "Example", "example@example.com", R.drawable.photo, R.drawable.mat3);
    this.addAccount(account3);
    // create sections
    this.addSection(newSection("Section 1", new FragmentIndex()));
    this.addSection(newSection("Section 2", new FragmentIndex()));
    this.addSection(newSection("Section 3", R.drawable.ic_mic_white_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#9c27b0")));
    this.addSection(newSection("Section", R.drawable.ic_hotel_grey600_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#03a9f4")));
    // create bottom section
    this.addBottomSection(newSection("Bottom Section", R.drawable.ic_settings_black_24dp, new Intent(this, Settings.class)));
}
Also used : FragmentButton(it.neokree.example.mockedFragments.FragmentButton) FragmentIndex(it.neokree.example.mockedFragments.FragmentIndex) Intent(android.content.Intent) MaterialAccount(it.neokree.materialnavigationdrawer.elements.MaterialAccount)

Example 12 with FragmentIndex

use of it.neokree.example.mockedFragments.FragmentIndex in project MaterialNavigationDrawer by neokree.

the class BackAnywhere method init.

@Override
public void init(Bundle savedInstanceState) {
    this.addSection(newSection("Section 1", new FragmentIndex()));
    this.addSection(newSection("Section 2", new FragmentIndex()));
    this.addSection(newSection("Section 3", R.drawable.ic_mic_white_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#9c27b0")));
    this.addSection(newSection("Section", R.drawable.ic_hotel_grey600_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#03a9f4")));
    // create bottom section
    this.addBottomSection(newSection("Bottom Section", R.drawable.ic_settings_black_24dp, new Intent(this, Settings.class)));
    // add pattern
    this.setBackPattern(MaterialNavigationDrawer.BACKPATTERN_BACK_ANYWHERE);
}
Also used : FragmentButton(it.neokree.example.mockedFragments.FragmentButton) FragmentIndex(it.neokree.example.mockedFragments.FragmentIndex) Intent(android.content.Intent)

Example 13 with FragmentIndex

use of it.neokree.example.mockedFragments.FragmentIndex in project MaterialNavigationDrawer by neokree.

the class ImageDrawerHeader method init.

@Override
public void init(Bundle savedInstanceState) {
    // set the header image
    this.setDrawerHeaderImage(R.drawable.mat2);
    // create sections
    this.addSection(newSection("Section 1", new FragmentIndex()));
    this.addSection(newSection("Section 2", new FragmentIndex()));
    this.addSection(newSection("Section 3", R.drawable.ic_mic_white_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#9c27b0")));
    this.addSection(newSection("Section", R.drawable.ic_hotel_grey600_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#03a9f4")));
    // create bottom section
    this.addBottomSection(newSection("Bottom Section", R.drawable.ic_settings_black_24dp, new Intent(this, Settings.class)));
}
Also used : FragmentButton(it.neokree.example.mockedFragments.FragmentButton) FragmentIndex(it.neokree.example.mockedFragments.FragmentIndex) Intent(android.content.Intent)

Example 14 with FragmentIndex

use of it.neokree.example.mockedFragments.FragmentIndex in project MaterialNavigationDrawer by neokree.

the class MockedAccount method init.

@Override
public void init(Bundle savedInstanceState) {
    // set header data
    setDrawerHeaderImage(R.drawable.mat2);
    setUsername("My App Name");
    setUserEmail("My version build");
    //setFirstAccountPhoto(getResources().getDrawable(R.drawable.photo));
    // create sections
    this.addSection(newSection("Section 1", new FragmentIndex()));
    this.addSection(newSection("Section 2", new FragmentIndex()));
    this.addSection(newSection("Section 3", R.drawable.ic_mic_white_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#9c27b0")));
    this.addSection(newSection("Section", R.drawable.ic_hotel_grey600_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#03a9f4")));
    // create bottom section
    this.addBottomSection(newSection("Bottom Section", R.drawable.ic_settings_black_24dp, new Intent(this, Settings.class)));
}
Also used : FragmentButton(it.neokree.example.mockedFragments.FragmentButton) FragmentIndex(it.neokree.example.mockedFragments.FragmentIndex) Intent(android.content.Intent)

Example 15 with FragmentIndex

use of it.neokree.example.mockedFragments.FragmentIndex in project MaterialNavigationDrawer by neokree.

the class ActionBarShadow method init.

@Override
public void init(Bundle savedInstanceState) {
    this.addSection(newSection("Section 1", new FragmentIndex()));
    this.addSection(newSection("Section 2", new FragmentIndex()));
    this.addSection(newSection("Section 3", R.drawable.ic_mic_white_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#9c27b0")));
    this.addSection(newSection("Section", R.drawable.ic_hotel_grey600_24dp, new FragmentButton()).setSectionColor(Color.parseColor("#03a9f4")));
    // create bottom section
    this.addBottomSection(newSection("Bottom Section", R.drawable.ic_settings_black_24dp, new Intent(this, Settings.class)));
// enable shadow programmatically
// enableToolbarElevation();
}
Also used : FragmentButton(it.neokree.example.mockedFragments.FragmentButton) FragmentIndex(it.neokree.example.mockedFragments.FragmentIndex) Intent(android.content.Intent)

Aggregations

Intent (android.content.Intent)21 FragmentButton (it.neokree.example.mockedFragments.FragmentButton)21 FragmentIndex (it.neokree.example.mockedFragments.FragmentIndex)21 MaterialAccount (it.neokree.materialnavigationdrawer.elements.MaterialAccount)5 View (android.view.View)2 MaterialSection (it.neokree.materialnavigationdrawer.elements.MaterialSection)1 MaterialSectionListener (it.neokree.materialnavigationdrawer.elements.listeners.MaterialSectionListener)1