NavigationDrawer-MaterialDesign


Source link: https://github.com/rudsonlive/NavigationDrawer-MaterialDesign

#Navigation drawer (library)

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

###Special thanks :D Jacob A. Moura for all his ideas, dedication, time and help.
You are part of this project.

###Sample Application

How to use? Very simple! : D

#If you want, check versions before

Change Log
Log file

#How to add to your project

### Gradle

dependencies {

compile 'br.com.liveo:navigationdrawer-material:2.5.1' 
}

### Maven

<dependency>
<groupId>br.com.liveo</groupId>
<artifactId>navigationdrawer-material</artifactId>
<version>2.5.1</version>
<type>aar</type> </dependency>

In your styles.xml choose your version:

<!--Customize here the subject of your application--> 
 <style name="myTheme" parent="Theme.AppCompat.Light.DarkActionBar">

<!-- Customize your theme here. -->

<item name="colorPrimary">@color/nliveo_blue_colorPrimary</item>

<item name="colorPrimaryDark">@color/nliveo_blue_colorPrimaryDark</item>

<item name="colorAccent">@color/nliveo_blue_colorPrimaryDark</item>
  </style>
<!--Here will be the theme of the class that will extends NavigationLiveo--> 
 <style name="nLiveoDrawer" parent="Theme.nLiveo">

<!-- Customize your theme here. -->

<item name="colorPrimary">@color/nliveo_blue_colorPrimary</item>

<item name="colorPrimaryDark">@color/nliveo_blue_alpha_colorPrimaryDark</item>

<item name="colorAccent">@color/nliveo_blue_colorPrimaryDark</item>
  </style>

Also there is nLiveo.Theme.Light theme

Available colors

note: colorPrimaryDark property theme "nLiveoDrawer" should receive a color with alpha eg # 80RRGGBB - The "# 80" will ensure the transparency of statusBar.

Remember to set your theme in your AndroidManifest.xml:


 <application
  <!--Theme of your application-->

android:theme="@style/myTheme" >


  <activity
  <!--Theme of the class that will extends NavigationLiveo-->

android:name=".MainActivity"

 android:theme="@style/nLiveoDrawer" //This is only necessary if using the NavigationLiveo

</activity>
  </application>

#In your Activity...

Create a class and it extends the NavigationLiveo and implement the br.liveo.interfaces.OnItemClickListener.

Ex: public class MainActivity extends NavigationLiveo implements OnItemClickListener {

###Do not use the method "onCreate" and "setContentView" of your Activity, you will use the method "onInt"

In the method "onInt" inform the items on your list


 private HelpLiveo mHelpLiveo;

@Override
  public void onInt(Bundle savedInstanceState) {

// User Information

this.userName.setText("Rudson Lima");

this.userEmail.setText("[email protected]");

this.userPhoto.setImageResource(R.drawable.ic_rudsonlive);

this.userBackground.setImageResource(R.drawable.ic_user_background_first);

 // Creating items navigation

mHelpLiveo = new HelpLiveo();

mHelpLiveo.add(getString(R.string.inbox), R.drawable.ic_inbox_black_24dp, 7);

mHelpLiveo.addSubHeader(getString(R.string.categories));
 //Item subHeader

mHelpLiveo.add(getString(R.string.starred), R.drawable.ic_star_black_24dp);

mHelpLiveo.add(getString(R.string.sent_mail), R.drawable.ic_send_black_24dp);

mHelpLiveo.add(getString(R.string.drafts), R.drawable.ic_drafts_black_24dp);

mHelpLiveo.addSeparator();
 // Item separator

mHelpLiveo.add(getString(R.string.trash), R.drawable.ic_delete_black_24dp);

mHelpLiveo.add(getString(R.string.spam), R.drawable.ic_report_black_24dp, 120);

 //with(this, Navigation.THEME_DARK). add theme dark

//with(this, Navigation.THEME_LIGHT). add theme light

 with(this) // default theme is dark

  .startingPosition(2) //Starting position in the list

  .addAllHelpItem(mHelpLiveo.getHelp())

  .footerItem(R.string.settings, R.drawable.ic_settings_black_24dp)

  .setOnClickUser(onClickPhoto)

  .setOnPrepareOptionsMenu(onPrepare)

  .setOnClickFooter(onClickFooter)

  .build();

  
}


In the method "onItemClick" you can get the position of the clicked item and the layout that you must inform the replace is the library R.id.container.

 @Override //The "R.id.container" should be used in "beginTransaction (). Replace"
  public void onItemClick(int position) {

FragmentManager mFragmentManager = getSupportFragmentManager();

Fragment mFragment = new FragmentMain().newInstance(mHelpLiveo.get(position).getName());

 if (mFragment != null){

 mFragmentManager.beginTransaction().replace(R.id.container, mFragment).commit();

}

  
}

 

User OnPrepareOptionsMenu onClick - Inform the listener in .setOnPrepareOptionsMenu(onPrepare) method in onInit ();

 private OnPrepareOptionsMenuLiveo onPrepare = new OnPrepareOptionsMenuLiveo() {

@Override

public void onPrepareOptionsMenu(Menu menu, int position, boolean visible) {

}

  
}
;

User photo onClick - Inform the listener in .setOnClickUser(onClickPhoto) method in onInit ();

 private View.OnClickListener onClickPhoto = new View.OnClickListener() {

@Override

public void onClick(View v) {

 closeDrawer();

}

  
}
; 

Footer onClick - Inform the listener in .setOnClickFooter(onClickFooter) method in onInit ();

 private View.OnClickListener onClickFooter = new View.OnClickListener() {

@Override

public void onClick(View v) {

 closeDrawer();

}

  
}
;

### NavigationActionBarLiveo
To use extends the NavigationActionBarLiveo

To remove the header, use the method ".removeHeader()"


Your application uses this library? You can promote it here! Just send your application that will be happy to disclose..

#Developed By
Name: Rudson Lima
E-mail: [email protected]
Subject: Navigation Drawer - Material Design

When using the design please remove all images and strings referring to Live-O. Thank you: D

#License

  Copyright 2015 Rudson Lima
  Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

reference: NavigationDrawer

Resources

Sometimes, you want your users to pick a color. A simple approach is to give the user a fixed roster of a handful of colors -- easy, but limited. A fancy approach is to use some form of color wheel, but these can be difficult to use on a touchscreen and perhaps impossible without a touchscreen.

ColorMixer is a widget that provides a simple set of SeekBars to let the user mix red, green, and blue to pick an arbitrary color. It is not very big, so it is easy to fit on a form, and it is still fairly finger-friendly.

It is also packaged as a dialog (ColorMixerDialog), a dialog-themed activity (ColorMixerActivity), and a preference (ColorPreference).

This project has a handful of Android containers (ViewGroup implementations) designed to handle specific scenarios:

  • AspectLockedFrameLayout that resizes itself, and its children, to fit within a specific aspect ratio
  • MirroringFrameLayout and an associated Mirror that duplicates and scales the contents of the MirroringFrameLayout onto the Mirror

Android BounceProgressBar Widget.

Library for handling Kiosk Mode in your Android Application. It restricts device to be using only one activity without possibility to switch to other app.

Features:

  • Run activity of you choice in kiosk mode
  • Blocks every application from going into foreground with activity manager
  • Handles home button by being a Launcher App

aminc is a version code incrementer for compiled AndroidManifest.xml files

This little program is needed to easily create separate APK files for each processor architecture.

Modern OpenGL/ES examples in Java are few and far between and this collection of demos showcases what is possible with OpenGL ES 3.0 / 3.1 + AEP. The purpose is to inform developers, but also provide a testbed for cross-device testing between various mobile GPUs.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes