在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):neokree/GoogleNavigationDrawer开源软件地址(OpenSource Url):https://github.com/neokree/GoogleNavigationDrawer开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):GoogleNavigationDrawerNavigation Drawer Activity with Google design style and simplified methods It requires 14+ API and android support v7 (Toolbar) IMPORTANT NOTICEThis library is no longer supported. How to add to your projectIn your Activity... public class MyActivity extends GoogleNavigationDrawer implements GAccountListener {
@Override
public void init(Bundle savedInstanceState) {
// add first account
GAccount account = new GAccount("NeoKree","[email protected]",this.getResources().getDrawable(R.drawable.photo),this.getResources().getDrawable(R.drawable.bamboo));
this.addAccount(account);
// set listener
this.setAccountListener(this);
// add your sections
this.addSection(this.newSection("Section 1",new FragmentIndex()));
this.addSection(this.newSection("Section 2",new FragmentIndex()));
this.addDivisor();
this.addSection(this.newSection("Recorder",this.getResources().getDrawable(R.drawable.ic_mic_white_24dp),new FragmentIndex()).setNotifications(10));
// add custom colored section with icon
this.addSection(this.newSection("Night Section", this.getResources().getDrawable(R.drawable.ic_hotel_grey600_24dp), new FragmentIndex())
.setSectionColor(Color.parseColor("#2196f3")).setNotifications(150)); // material blue 500
this.addDivisor();
// add custom colored section with only text
this.addSection(this.newSection("Last Section", new FragmentIndex()).setSectionColor((Color.parseColor("#ff9800")))); // material orange 500
Intent i = new Intent(this,Settings.class);
this.addSection(this.newSection("Settings",this.getResources().getDrawable(R.drawable.ic_settings_black_24dp),i));
}
} In your styles.xml choose your version <resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="GoogleNavigationDrawerTheme">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/light_blue_500</item>
<item name="colorAccent">@color/grey_1000</item>
</style>
<!-- Light version theme. -->
<style name="AppTheme" parent="GoogleNavigationDrawerTheme.Light">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/light_blue_500</item>
<item name="colorAccent">@color/grey_1000</item>
</style>
<!-- Light version with Black actionbar -->
<style name="AppTheme" parent="GoogleNavigationDrawerTheme.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/light_blue_500</item>
<item name="colorAccent">@color/grey_1000</item>
</style>
</resources> N.B. Not override How to importAdd this to your build.gradle: ```java repositories { mavenCentral() } Android Studiodependencies { compile 'it.neokree:GoogleNavigationDrawer:0.6' }
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论