Skip to content

Commit

Permalink
Moving MVP logic into a common module
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokimo committed Oct 18, 2015
1 parent b078999 commit e0b3ac6
Show file tree
Hide file tree
Showing 59 changed files with 187 additions and 558 deletions.
3 changes: 2 additions & 1 deletion base-mvp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':base-domain')
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import io.kimo.base.presentation.mvp.Model;
import io.kimo.base.presentation.mvp.view.LoadDataCollectionView;


public class LoadDataCollectionPresenter<E extends Entity, M extends Model> extends BasePresenter<LoadDataCollectionView<M>> {

protected Executor executor;
Expand Down
18 changes: 0 additions & 18 deletions base/src/main/java/io/kimo/base/presentation/BaseApp.java

This file was deleted.

2 changes: 1 addition & 1 deletion example-base-v4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':base-v4')
compile project(':example-domain')
compile project(':example-mvp')
compile 'com.squareup.picasso:picasso:2.5.2'
}
5 changes: 2 additions & 3 deletions example-base-v4/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".ExampleApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".ui.activity.MainActivity"
android:name=".activity.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.activity.ExampleDetailActivity" />
<activity android:name=".activity.ExampleDetailActivity" />
</application>

</manifest>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package io.kimo.base.v4.example.ui.activity;
package io.kimo.base.v4.example.activity;


import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;

import io.kimo.base.mvp.example.mapper.ExampleMapper;
import io.kimo.base.mvp.example.model.ExampleModel;
import io.kimo.base.v4.example.R;
import io.kimo.base.v4.example.mapper.ExampleMapper;
import io.kimo.base.v4.example.mvp.model.ExampleModel;
import io.kimo.base.v4.example.ui.fragment.ExampleDetailFragment;
import io.kimo.base.v4.example.fragment.ExampleDetailFragment;
import io.kimo.base.v4.presentation.ui.BaseFragmentActivity;

public class ExampleDetailActivity extends BaseFragmentActivity {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.kimo.base.v4.example.ui.activity;
package io.kimo.base.v4.example.activity;

import android.support.v4.app.Fragment;

import io.kimo.base.v4.example.R;
import io.kimo.base.v4.example.ui.fragment.ExampleListFragment;
import io.kimo.base.v4.example.fragment.ExampleListFragment;
import io.kimo.base.v4.presentation.ui.BaseFragmentActivity;

public class MainActivity extends BaseFragmentActivity {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.kimo.base.v4.example.ui.adapter;
package io.kimo.base.v4.example.adapter;

import android.content.Context;
import android.view.LayoutInflater;
Expand All @@ -10,8 +10,9 @@
import java.util.ArrayList;
import java.util.List;

import io.kimo.base.mvp.example.model.ExampleModel;
import io.kimo.base.v4.example.R;
import io.kimo.base.v4.example.mvp.model.ExampleModel;



public class ExampleListAdapter extends BaseAdapter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.kimo.base.v4.example.ui.fragment;
package io.kimo.base.v4.example.fragment;

import android.os.Bundle;
import android.view.View;
Expand All @@ -9,11 +9,11 @@
import com.squareup.picasso.MemoryPolicy;
import com.squareup.picasso.Picasso;

import io.kimo.base.mvp.example.mapper.ExampleMapper;
import io.kimo.base.mvp.example.model.ExampleModel;
import io.kimo.base.mvp.example.presenter.ExampleDetailPresenter;
import io.kimo.base.mvp.example.view.ExampleDetailView;
import io.kimo.base.v4.example.R;
import io.kimo.base.v4.example.mapper.ExampleMapper;
import io.kimo.base.v4.example.mvp.model.ExampleModel;
import io.kimo.base.v4.example.mvp.presenter.ExampleDetailPresenter;
import io.kimo.base.v4.example.mvp.view.ExampleDetailView;
import io.kimo.base.v4.presentation.mvp.BaseView;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.kimo.base.v4.example.ui.fragment;
package io.kimo.base.v4.example.fragment;

import android.content.Context;
import android.view.View;
Expand All @@ -10,12 +10,12 @@

import java.util.List;

import io.kimo.base.mvp.example.model.ExampleModel;
import io.kimo.base.mvp.example.presenter.ExampleListPresenter;
import io.kimo.base.mvp.example.view.ExampleListView;
import io.kimo.base.v4.example.R;
import io.kimo.base.v4.example.mvp.model.ExampleModel;
import io.kimo.base.v4.example.mvp.presenter.ExampleListPresenter;
import io.kimo.base.v4.example.mvp.view.ExampleListView;
import io.kimo.base.v4.example.ui.activity.ExampleDetailActivity;
import io.kimo.base.v4.example.ui.adapter.ExampleListAdapter;
import io.kimo.base.v4.example.activity.ExampleDetailActivity;
import io.kimo.base.v4.example.adapter.ExampleListAdapter;
import io.kimo.base.v4.presentation.mvp.BaseView;


Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion example-base-v7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':base-v7')
compile project(':example-domain')
compile project(':example-mvp')
compile 'com.squareup.picasso:picasso:2.5.2'
}
5 changes: 2 additions & 3 deletions example-base-v7/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".ExampleApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".ui.activity.MainActivity"
android:name=".activity.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.activity.ExampleDetailActivity" />
<activity android:name=".activity.ExampleDetailActivity" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package io.kimo.base.v7.example.ui;
package io.kimo.base.v7.example;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;

import io.kimo.base.v7.example.R;
import io.kimo.base.v7.presentation.ui.BaseAppCompatActivity;

public abstract class ExampleActivity extends BaseAppCompatActivity{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package io.kimo.base.v7.example.ui.activity;
package io.kimo.base.v7.example.activity;


import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;

import io.kimo.base.mvp.example.mapper.ExampleMapper;
import io.kimo.base.mvp.example.model.ExampleModel;
import io.kimo.base.v7.example.ExampleActivity;
import io.kimo.base.v7.example.R;
import io.kimo.base.v7.example.mapper.ExampleMapper;
import io.kimo.base.v7.example.mvp.model.ExampleModel;
import io.kimo.base.v7.example.ui.ExampleActivity;
import io.kimo.base.v7.example.ui.fragment.ExampleDetailFragment;
import io.kimo.base.v7.example.fragment.ExampleDetailFragment;


public class ExampleDetailActivity extends ExampleActivity {

Expand Down
Loading

0 comments on commit e0b3ac6

Please sign in to comment.