Skip to content

Commit

Permalink
First Master branch commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuon Bondol committed Sep 13, 2017
1 parent 2a581e7 commit 9b5828d
Show file tree
Hide file tree
Showing 77 changed files with 1,846 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
44 changes: 44 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 26
buildToolsVersion "$buildToolsVersionCode"
defaultConfig {
applicationId "core.mvp.kotlinandroid"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "com.android.support:appcompat-v7:$supportVersion"
compile "com.android.support:support-compat:$supportVersion"
compile "com.android.support:recyclerview-v7:$supportVersion"
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.github.BondolTuon:TextViewUtilAndroid:1.0.3'
compile 'com.github.bumptech.glide:glide:4.1.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'
testCompile 'junit:junit:4.12'
compile project(':recyclerviewinfinitescroll')
}
25 changes: 25 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/tuonbondol/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package nanita.entr.android;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.youthenterpreneur.youthenterpreneur", appContext.getPackageName());
}
}
25 changes: 25 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="core.mvp.kotlinandroid">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="nanita.entr.android.splashscreen.SplashScreenActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="nanita.entr.android.home.HomeActivity" />
</application>

</manifest>
Binary file added app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions app/src/main/java/nanita/entr/android/BaseActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package nanita.entr.android

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.MenuItem
import core.mvp.kotlinandroid.R
import kotlinx.android.synthetic.main.default_backpress_toolbar_layout.*

/****
*
* @author TUON BONDOL Date: 9/1/17.
*
*/

open class BaseActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}

open fun onSetUpGeneralBackPressToolbar(toolbarTitle: String) {
setSupportActionBar(tbGeneralBackPress)

supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setDisplayShowTitleEnabled(false)
supportActionBar?.setHomeAsUpIndicator(R.drawable.back_press_white_icon_24dp)

tvToolbarTitle.text = toolbarTitle
}

open fun onSetUpGeneralCrossCloseToolbar(toolbarTitle: String) {
setSupportActionBar(tbGeneralBackPress)

supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setDisplayShowTitleEnabled(false)
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp)

tvToolbarTitle.text = toolbarTitle
}

override fun onOptionsItemSelected(item: MenuItem?): Boolean {
val id = item?.itemId
when (id) {
android.R.id.home -> {
finish()
return true
}
else -> return super.onOptionsItemSelected(item)
}
}
}
11 changes: 11 additions & 0 deletions app/src/main/java/nanita/entr/android/BaseModel.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package nanita.entr.android

/****
*
* @author TUON BONDOL Date: 9/1/17.
*
*/

interface BaseModel {
fun responseError(errorObjects: Any)
}
10 changes: 10 additions & 0 deletions app/src/main/java/nanita/entr/android/BasePresenter.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package nanita.entr.android

/****
*
* @author TUON BONDOL Date: 9/1/17.
*
*/

interface BasePresenter {
}
11 changes: 11 additions & 0 deletions app/src/main/java/nanita/entr/android/BaseView.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package nanita.entr.android

/****
*
* @author TUON BONDOL Date: 9/1/17.
*
*/

interface BaseView<T> {
fun setPresenter(presenter: T)
}
Loading

0 comments on commit 9b5828d

Please sign in to comment.