├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.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 │ │ │ ├── drawable │ │ │ │ ├── gradient_1.xml │ │ │ │ ├── gradient_2.xml │ │ │ │ ├── gradient_3.xml │ │ │ │ ├── nav_item_bg.xml │ │ │ │ ├── ic_brightness_1_black_24dp.xml │ │ │ │ ├── ic_chat_bubble_black_24dp.xml │ │ │ │ ├── animated_gradient_background.xml │ │ │ │ ├── ic_videocam_black_24dp.xml │ │ │ │ ├── ic_email_black_24dp.xml │ │ │ │ ├── ic_work_black_24dp.xml │ │ │ │ ├── ic_camera_alt_black_24dp.xml │ │ │ │ ├── ic_people_black_24dp.xml │ │ │ │ ├── ic_whatshot_black_24dp.xml │ │ │ │ ├── ic_settings_black_24dp.xml │ │ │ │ ├── ic_man.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ ├── layout │ │ │ │ ├── nav_item_row_layout.xml │ │ │ │ ├── nav_drawer_layout.xml │ │ │ │ ├── content_main.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── app_bar_main.xml │ │ │ │ └── nav_drawer_header.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── me │ │ │ │ └── inassar │ │ │ │ └── slidingcontent │ │ │ │ ├── model │ │ │ │ └── NavItemModel.kt │ │ │ │ ├── state │ │ │ │ └── ScreenState.kt │ │ │ │ ├── view │ │ │ │ ├── activity │ │ │ │ │ ├── MainActivityState.kt │ │ │ │ │ ├── MainActivityInteractor.kt │ │ │ │ │ ├── MainActivityViewModel.kt │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── adapter │ │ │ │ │ └── NavAdapter.kt │ │ │ │ └── extensions.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── me │ │ │ └── inassar │ │ │ └── slidingcontent │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── me │ │ └── inassar │ │ └── slidingcontent │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── screenshoot ├── 0-preview.jpg ├── 1-design.jpg └── 2-design.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── vcs.xml ├── misc.xml ├── runConfigurations.xml └── gradle.xml ├── .gitignore ├── LICENSE ├── gradle.properties ├── README.md ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /screenshoot/0-preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/screenshoot/0-preview.jpg -------------------------------------------------------------------------------- /screenshoot/1-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/screenshoot/1-design.jpg -------------------------------------------------------------------------------- /screenshoot/2-design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/screenshoot/2-design.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /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/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranger163/SlidingMenuNavigation/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | #FFFFFF 7 | 8 | -------------------------------------------------------------------------------- /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/drawable/nav_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /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/res/drawable/ic_brightness_1_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chat_bubble_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/animated_gradient_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_videocam_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_email_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nav_item_row_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_work_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /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/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 | } -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 |