• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

neokree/GoogleNavigationDrawer: Navigation Drawer Activity with Google design st ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

neokree/GoogleNavigationDrawer

开源软件地址(OpenSource Url):

https://github.com/neokree/GoogleNavigationDrawer

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

GoogleNavigationDrawer

Navigation Drawer Activity with Google design style and simplified methods
Android ArsenalDonate

It requires 14+ API and android support v7 (Toolbar)

Download example apk

IMPORTANT NOTICE

This library is no longer supported.

How to add to your project

In 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 OnCreate method! Use init method instead.

How to import

Android Studio
Add this to your build.gradle: ```java repositories { mavenCentral() }

dependencies { compile 'it.neokree:GoogleNavigationDrawer:0.6' }


You don't know how to do something? Visit the [wiki](https://github.com/neokree/GoogleNavigationDrawer/wiki)!

<img src="https://raw.github.com/neokree/GoogleNavigationDrawer/master/screen1.png" alt="screenshot" width="300px" height="auto" />
<img src="https://raw.github.com/neokree/GoogleNavigationDrawer/master/screen2.png" alt="screenshot" width="300px" height="auto" />
 



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
iwestlin/gd-utils: Google Drive 百宝箱发布时间:2022-06-11
下一篇:
googleads/googleads-ima-html5: Samples for the HTML5 IMA SDK.发布时间:2022-06-11
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap