Skip to content

Commit 1462b06

Browse files
Merge pull request #10 from Omega-R/develop
Refactoring and fixing
2 parents 664f191 + 9bd6cb7 commit 1462b06

File tree

54 files changed

+591
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+591
-135
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ allprojects {
2424
ext {
2525
targetVersionCode = 46
2626
targetVersionName = "1.5.6"
27-
kotlin_version = '1.3.21'
27+
kotlin_version = '1.3.41'
2828

2929
deps = [
3030
android : 'com.google.android:android:1.6_r2',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ android {
2424
versionCode 1
2525
versionName "1.0"
2626

27-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
27+
testInstrumentationRunner "android.support.generateInfos.runner.AndroidJUnitRunner"
2828
}
2929

3030
sourceSets {

moxy-androidx-sapmle/src/main/AndroidManifest.xml renamed to moxy-androidx-sample/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="example.com.moxy_androidx_sapmle">
3+
package="example.com.moxy_androidx_sample">
44

55
<application
66
android:allowBackup="true"
@@ -9,7 +9,7 @@
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:supportsRtl="true"
1111
android:theme="@style/AppTheme">
12-
<activity android:name=".MainActivity">
12+
<activity android:name="example.com.moxy_androidx_sample.MainActivity">
1313
<intent-filter>
1414
<action android:name="android.intent.action.MAIN"/>
1515

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package example.com.moxy_androidx_sample;
2+
3+
import com.omegar.mvp.MvpAppCompatActivity;
4+
5+
public abstract class BaseActivity extends MvpAppCompatActivity implements BaseView {
6+
7+
@Override
8+
public void testFunction() {
9+
10+
}
11+
12+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package example.com.moxy_androidx_sample;
2+
3+
import com.omegar.mvp.MvpView;
4+
5+
public interface BaseView extends MvpView {
6+
7+
void testFunction();
8+
9+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package example.com.moxy_androidx_sample
2+
3+
import android.location.Location
4+
import android.os.Bundle
5+
import android.util.Log
6+
import com.omegar.mvp.presenter.InjectPresenter
7+
import example.com.moxy_androidx_sample.contract.Contract
8+
import example.com.moxy_androidx_sample.packagee.Item
9+
10+
class MainActivity : BaseActivity(), Contract.MainView, SecondInterface {
11+
override fun fourth(item: String?) {
12+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
13+
}
14+
15+
override fun firstLog(m: Item?) {
16+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
17+
}
18+
19+
override fun firstCopyMethod(item: MutableList<Location>?) {
20+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
21+
}
22+
23+
override fun thirdMethod() {
24+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
25+
}
26+
27+
override fun secondMethod() {
28+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
29+
}
30+
31+
override fun firstMethod(item: List<Item>) {
32+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
33+
}
34+
35+
@InjectPresenter
36+
internal lateinit var presenter: MainPresenter
37+
38+
override fun onCreate(savedInstanceState: Bundle?) {
39+
super.onCreate(savedInstanceState)
40+
// setContentView(R.layout.activity_main)
41+
}
42+
43+
override fun printLog(msg: Double?, log: String?) {
44+
Log.e(TAG, "printLog : msg : $msg activity hash code : ${hashCode()}")
45+
}
46+
47+
override fun second() {
48+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
49+
}
50+
51+
companion object {
52+
const val TAG = "MoxyDebug"
53+
}
54+
}

moxy-androidx-sapmle/src/main/kotlin/example/com/moxy_androidx_sapmle/MainPresenter.kt renamed to moxy-androidx-sample/src/main/kotlin/example/com/moxy_androidx_sample/MainPresenter.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
package example.com.moxy_androidx_sapmle
1+
package example.com.moxy_androidx_sample
22

33
import android.util.Log
44
import com.omegar.mvp.InjectViewState
55
import com.omegar.mvp.MvpPresenter
6+
import example.com.moxy_androidx_sample.contract.Contract
67

78
@InjectViewState
8-
class MainPresenter : MvpPresenter<MainView>() {
9+
class MainPresenter : MvpPresenter<Contract.MainView>() {
910

1011
override fun onFirstViewAttach() {
1112
super.onFirstViewAttach()
1213
Log.e(MainActivity.TAG, "presenter hash code : ${hashCode()}")
13-
viewState.printLog("TEST")
14+
viewState.printLog(10.0, "Kek")
1415
}
1516

1617
}

0 commit comments

Comments
 (0)