├── .gitignore
├── .idea
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── gradle.xml
├── misc.xml
├── runConfigurations.xml
└── vcs.xml
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── inassar
│ │ └── slidingcontent
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── inassar
│ │ │ └── slidingcontent
│ │ │ ├── extensions.kt
│ │ │ ├── model
│ │ │ └── NavItemModel.kt
│ │ │ ├── state
│ │ │ └── ScreenState.kt
│ │ │ └── view
│ │ │ ├── activity
│ │ │ ├── MainActivity.kt
│ │ │ ├── MainActivityInteractor.kt
│ │ │ ├── MainActivityState.kt
│ │ │ └── MainActivityViewModel.kt
│ │ │ └── adapter
│ │ │ └── NavAdapter.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── animated_gradient_background.xml
│ │ ├── gradient_1.xml
│ │ ├── gradient_2.xml
│ │ ├── gradient_3.xml
│ │ ├── ic_brightness_1_black_24dp.xml
│ │ ├── ic_camera_alt_black_24dp.xml
│ │ ├── ic_chat_bubble_black_24dp.xml
│ │ ├── ic_email_black_24dp.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_man.xml
│ │ ├── ic_people_black_24dp.xml
│ │ ├── ic_settings_black_24dp.xml
│ │ ├── ic_videocam_black_24dp.xml
│ │ ├── ic_whatshot_black_24dp.xml
│ │ ├── ic_work_black_24dp.xml
│ │ └── nav_item_bg.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── app_bar_main.xml
│ │ ├── content_main.xml
│ │ ├── nav_drawer_header.xml
│ │ ├── nav_drawer_layout.xml
│ │ └── nav_item_row_layout.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── me
│ └── inassar
│ └── slidingcontent
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshoot
├── 0-preview.jpg
├── 1-design.jpg
└── 2-design.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | xmlns:android
51 | ^$
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | xmlns:.*
61 | ^$
62 |
63 |
64 | BY_NAME
65 |
66 |
67 |
68 |
69 |
70 |
71 | .*:id
72 | http://schemas.android.com/apk/res/android
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | .*:name
82 | http://schemas.android.com/apk/res/android
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | name
92 | ^$
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | style
102 | ^$
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | .*
112 | ^$
113 |
114 |
115 | BY_NAME
116 |
117 |
118 |
119 |
120 |
121 |
122 | .*
123 | http://schemas.android.com/apk/res/android
124 |
125 |
126 | ANDROID_ATTRIBUTE_ORDER
127 |
128 |
129 |
130 |
131 |
132 |
133 | .*
134 | .*
135 |
136 |
137 | BY_NAME
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Ahmed Nassar
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SlidingMenuNavigation
2 |
3 | ## Introduction
4 |
5 | This is a [PROJECT IVORY](https://github.com/ranger163/ProjectIvory) repository for a picked up free design from [uplabs.com](https://www.uplabs.com/posts/side-menu-mobile-navigation) website written
6 | in kotlin using MVVM design pattern that containes one screen "Home" screen.I've implemented the screen and it's
7 | functions "NOT ONLY DESIGN OR XML FILES"and made it ready to be customized on your project if you wish to use it just clone
8 | this project and start customizing.
9 |
10 | ## Requirements
11 |
12 | This module requires the following modules/libraries:
13 |
14 | * [Kotlin](https://kotlinlang.org)
15 | * [Androidx](https://developer.android.com/jetpack/androidx)
16 | * [Android ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel)
17 | * [Android LiveData](https://developer.android.com/topic/libraries/architecture/livedata)
18 | * [Navigation Drawer](https://developer.android.com/training/implementing-navigation/nav-drawer)
19 | * [MVVM Design pattern](https://antonioleiva.com/mvvm-vs-mvp)
20 |
21 | ## Installation
22 |
23 | Install as usual,
24 | * Clone this repo.
25 | * Update your android studio to verion 3.3.1 .
26 | * Happy coding.
27 | * Support me by staring this repo and following me for more projects.
28 |
29 | ## APK
30 |
31 | You can try the apk on your device from [here](https://drive.google.com/open?id=1qJyZGiLsbsP9i6l1Bf5O_VAcERn6aMP6)
32 |
33 | ## Screen Shoots
34 |
35 | | Preview |
36 | | ------------- |
37 | |  |
38 |
39 | | Deisgn |
40 | | ------------- |
41 | |  |
42 |
43 | ## Hire Me
44 | I'm ready for a full-time or a freelancing job, just drop me an email [here](https://www.inassar.me) and let's do our chating.
45 |
46 | ## License
47 | Made with :heart: by [Ahmed Nassar](https://github.com/ranger163), licensed under the [MIT License](LICENSE)
48 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 28
9 | defaultConfig {
10 | applicationId "me.inassar.slidingcontent"
11 | minSdkVersion 18
12 | targetSdkVersion 28
13 | versionCode 1
14 | versionName "1.0"
15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16 | vectorDrawables.useSupportLibrary = true
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | }
25 |
26 | dependencies {
27 | testImplementation 'junit:junit:4.12'
28 | implementation fileTree(dir: 'libs', include: ['*.jar'])
29 | androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
30 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
31 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
32 | implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
33 | implementation 'androidx.core:core-ktx:1.1.0-alpha04'
34 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
35 | implementation 'com.google.android.material:material:1.1.0-alpha03'
36 | implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
37 | implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0-alpha02'
38 | }
39 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/me/inassar/slidingcontent/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent
2 |
3 | import androidx.test.InstrumentationRegistry
4 | import androidx.test.runner.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getTargetContext()
22 | assertEquals("me.inassar.slidingcontent", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/java/me/inassar/slidingcontent/extensions.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent
2 |
3 | import android.content.Context
4 | import android.graphics.drawable.AnimationDrawable
5 | import android.view.View
6 | import android.widget.Toast
7 |
8 | fun View.enableAnimatedBackground() {
9 | val animationDrawable = background as AnimationDrawable
10 | animationDrawable.apply {
11 | setEnterFadeDuration(2000)
12 | setExitFadeDuration(4000)
13 | start()
14 | }
15 | }
16 |
17 | fun Context.toast(message: String) {
18 | Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
19 | }
--------------------------------------------------------------------------------
/app/src/main/java/me/inassar/slidingcontent/model/NavItemModel.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent.model
2 |
3 | data class NavItemModel(val icon: Int)
--------------------------------------------------------------------------------
/app/src/main/java/me/inassar/slidingcontent/state/ScreenState.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent.state
2 |
3 | sealed class ScreenState {
4 | class Render(val renderState: T) : ScreenState()
5 | }
--------------------------------------------------------------------------------
/app/src/main/java/me/inassar/slidingcontent/view/activity/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent.view.activity
2 |
3 | import android.graphics.Color
4 | import android.os.Bundle
5 | import android.view.Menu
6 | import android.view.MenuItem
7 | import android.view.View
8 | import androidx.appcompat.app.ActionBarDrawerToggle
9 | import androidx.appcompat.app.AppCompatActivity
10 | import androidx.core.view.GravityCompat
11 | import androidx.lifecycle.ViewModelProviders
12 | import androidx.recyclerview.widget.GridLayoutManager
13 | import com.google.android.material.snackbar.Snackbar
14 | import kotlinx.android.synthetic.main.activity_main.*
15 | import kotlinx.android.synthetic.main.app_bar_main.*
16 | import kotlinx.android.synthetic.main.nav_drawer_layout.*
17 | import me.inassar.slidingcontent.R
18 | import me.inassar.slidingcontent.enableAnimatedBackground
19 | import me.inassar.slidingcontent.state.ScreenState
20 | import me.inassar.slidingcontent.toast
21 | import me.inassar.slidingcontent.view.adapter.NavAdapter
22 |
23 | class MainActivity : AppCompatActivity() {
24 |
25 | private lateinit var toggle: ActionBarDrawerToggle
26 | private lateinit var viewModel: MainActivityViewModel
27 |
28 | override fun onCreate(savedInstanceState: Bundle?) {
29 | super.onCreate(savedInstanceState)
30 | setContentView(R.layout.activity_main)
31 | setSupportActionBar(toolbar)
32 |
33 | viewModel = ViewModelProviders.of(
34 | this,
35 | MainActivityViewModel.MainActivityViewModelFactory(MainActivityInteractor())
36 | )[MainActivityViewModel::class.java]
37 | viewModel.navItemsState.observe(::getLifecycle, ::updateDrawerItems)
38 |
39 | setDrawer()
40 | interactions()
41 | }
42 |
43 | override fun onCreateOptionsMenu(menu: Menu): Boolean {
44 | // Inflate the menu; this adds items to the action bar if it is present.
45 | menuInflater.inflate(R.menu.menu_main, menu)
46 | return true
47 | }
48 |
49 | override fun onOptionsItemSelected(item: MenuItem): Boolean {
50 | // Handle action bar item clicks here. The action bar will
51 | // automatically handle clicks on the Home/Up button, so long
52 | // as you specify a parent activity in AndroidManifest.xml.
53 | return when (item.itemId) {
54 | R.id.action_settings -> true
55 | else -> super.onOptionsItemSelected(item)
56 | }
57 | }
58 |
59 | override fun onBackPressed() {
60 | if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
61 | drawerLayout.closeDrawer(GravityCompat.START)
62 | } else {
63 | super.onBackPressed()
64 | }
65 | }
66 |
67 | private fun interactions() {
68 | fab.setOnClickListener { view ->
69 | Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
70 | .setAction("Action", null).show()
71 | }
72 | }
73 |
74 | private fun setDrawer() {
75 | toggle = object : ActionBarDrawerToggle(
76 | this, drawerLayout, toolbar,
77 | R.string.nav_drawer_open, R.string.nav_drawer_close
78 | ) {
79 |
80 | val scaleFactor = 6f
81 |
82 | override fun onDrawerSlide(drawerView: View, slideOffset: Float) {
83 | super.onDrawerSlide(drawerView, slideOffset)
84 | val slideX = drawerView.width.times(slideOffset)
85 | content.apply {
86 | translationX = slideX
87 | scaleX = 1.minus(slideOffset.div(scaleFactor))
88 | scaleY = 1.minus(slideOffset.div(scaleFactor))
89 | }
90 | }
91 | }.apply { syncState() }
92 |
93 | drawerLayout.apply {
94 | setScrimColor(Color.TRANSPARENT)
95 | drawerElevation = 0f
96 | addDrawerListener(toggle)
97 | enableAnimatedBackground()
98 | }
99 | }
100 |
101 | private fun updateDrawerItems(screenState: ScreenState?) {
102 | when (screenState) {
103 | is ScreenState.Render -> setDrawerItems(screenState.renderState)
104 | }
105 | }
106 |
107 | private fun setDrawerItems(renderState: MainActivityState) {
108 | when (renderState) {
109 | is MainActivityState.ShowNavItems -> {
110 | navRecycler.apply {
111 | layoutManager = GridLayoutManager(this@MainActivity, 2)
112 | adapter = NavAdapter(renderState.navItems, viewModel::onNavItemClicked)
113 | }
114 | }
115 | is MainActivityState.HandleNavItemClick -> {
116 | toast("ItemClicked")
117 | drawerLayout.closeDrawer(GravityCompat.START)
118 | }
119 | }
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/app/src/main/java/me/inassar/slidingcontent/view/activity/MainActivityInteractor.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent.view.activity
2 |
3 | import me.inassar.slidingcontent.R
4 | import me.inassar.slidingcontent.model.NavItemModel
5 |
6 | class MainActivityInteractor {
7 |
8 | fun getNavItems(callback: (ArrayList) -> Unit) {
9 | callback(createNavItemList())
10 | }
11 |
12 | private fun createNavItemList(): ArrayList {
13 |
14 | val navItems:ArrayList? = ArrayList()
15 | navItems?.add(NavItemModel(R.drawable.ic_whatshot_black_24dp))
16 | navItems?.add(NavItemModel(R.drawable.ic_work_black_24dp))
17 | navItems?.add(NavItemModel(R.drawable.ic_videocam_black_24dp))
18 | navItems?.add(NavItemModel(R.drawable.ic_settings_black_24dp))
19 | navItems?.add(NavItemModel(R.drawable.ic_camera_alt_black_24dp))
20 | navItems?.add(NavItemModel(R.drawable.ic_email_black_24dp))
21 | navItems?.add(NavItemModel(R.drawable.ic_people_black_24dp))
22 | navItems?.add(NavItemModel(R.drawable.ic_chat_bubble_black_24dp))
23 |
24 | return navItems!!
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/me/inassar/slidingcontent/view/activity/MainActivityState.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent.view.activity
2 |
3 | import me.inassar.slidingcontent.model.NavItemModel
4 |
5 | sealed class MainActivityState {
6 | class ShowNavItems(val navItems: ArrayList) : MainActivityState()
7 | class HandleNavItemClick(val navItem: NavItemModel) : MainActivityState()
8 | }
--------------------------------------------------------------------------------
/app/src/main/java/me/inassar/slidingcontent/view/activity/MainActivityViewModel.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent.view.activity
2 |
3 | import androidx.lifecycle.LiveData
4 | import androidx.lifecycle.MutableLiveData
5 | import androidx.lifecycle.ViewModel
6 | import androidx.lifecycle.ViewModelProvider
7 | import me.inassar.slidingcontent.model.NavItemModel
8 | import me.inassar.slidingcontent.state.ScreenState
9 |
10 | class MainActivityViewModel(private val mainActivityInteractor: MainActivityInteractor) : ViewModel() {
11 |
12 | private lateinit var _navItemsState: MutableLiveData>
13 | val navItemsState: LiveData>
14 | get() {
15 | if (!::_navItemsState.isInitialized) {
16 | _navItemsState = MutableLiveData()
17 | mainActivityInteractor.getNavItems(::onNavItemsLoaded)
18 | }
19 | return _navItemsState
20 | }
21 |
22 | private fun onNavItemsLoaded(navItems: ArrayList) {
23 | _navItemsState.value = ScreenState.Render(MainActivityState.ShowNavItems(navItems))
24 | }
25 |
26 | fun onNavItemClicked(navItem: NavItemModel) {
27 | _navItemsState.value = ScreenState.Render(MainActivityState.HandleNavItemClick(navItem))
28 | }
29 |
30 | class MainActivityViewModelFactory(private val mainActivityInteractor: MainActivityInteractor) :
31 | ViewModelProvider.NewInstanceFactory() {
32 | override fun create(modelClass: Class): T {
33 | return MainActivityViewModel(mainActivityInteractor) as T
34 | }
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/app/src/main/java/me/inassar/slidingcontent/view/adapter/NavAdapter.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent.view.adapter
2 |
3 | import android.view.LayoutInflater
4 | import android.view.View
5 | import android.view.ViewGroup
6 | import androidx.recyclerview.widget.RecyclerView
7 | import kotlinx.android.synthetic.main.nav_item_row_layout.view.*
8 | import me.inassar.slidingcontent.R
9 | import me.inassar.slidingcontent.model.NavItemModel
10 |
11 | class NavAdapter(
12 | private val itemData: ArrayList,
13 | private val itemClick: (NavItemModel) -> Unit
14 | ) :
15 | RecyclerView.Adapter() {
16 |
17 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
18 | return ViewHolder(
19 | LayoutInflater.from(parent.context)
20 | .inflate(R.layout.nav_item_row_layout, parent, false)
21 | )
22 | }
23 |
24 | override fun getItemCount(): Int {
25 | return if (itemData.isNotEmpty())
26 | itemData.size
27 | else 0
28 | }
29 |
30 | override fun onBindViewHolder(holder: ViewHolder, position: Int) {
31 | holder.bind(itemData[position], itemClick)
32 | }
33 |
34 | inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
35 | fun bind(item: NavItemModel, itemClick: (NavItemModel) -> Unit) {
36 | // UI Setting Code
37 | itemView.navItemImg.setImageResource(item.icon)
38 | itemView.setOnClickListener { itemClick(item) }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/animated_gradient_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gradient_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gradient_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gradient_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_brightness_1_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_camera_alt_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_chat_bubble_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_email_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
70 |
72 |
74 |
75 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_man.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
16 |
19 |
22 |
25 |
28 |
31 |
34 |
37 |
40 |
43 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_people_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_settings_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_videocam_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_whatshot_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_work_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/nav_item_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_bar_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_drawer_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
18 |
33 |
34 |
47 |
48 |
58 |
59 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_drawer_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_item_row_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 | #FFFFFF
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SlidingContent
3 | Settings
4 | "@ranger163"
5 | Option 1
6 | Option 2
7 | Option 3
8 | Open navigation drawer
9 | Close navigation drawer
10 | 80%
11 | Ahmed Nassar
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/test/java/me/inassar/slidingcontent/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package me.inassar.slidingcontent
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.3.21'
5 | repositories {
6 | google()
7 | jcenter()
8 |
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.3.1'
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 |
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
22 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Feb 20 15:36:55 EET 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/screenshoot/0-preview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/screenshoot/0-preview.jpg
--------------------------------------------------------------------------------
/screenshoot/1-design.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/screenshoot/1-design.jpg
--------------------------------------------------------------------------------
/screenshoot/2-design.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/a56158951771af11079c7b39321c9727b18ea8c8/screenshoot/2-design.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------