Refactor presenters to the "presenters" package, fixed throttling text (tree level 3), added default image when no images.
This commit is contained in:
parent
5dc987d0b8
commit
174753d78c
@ -3,6 +3,135 @@
|
||||
<component name="WizardSettings">
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="imageWizard">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="imageAssetPanel">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="actionbar">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="clipArt">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="color" value="000000" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="image">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="color" value="000000" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="assetType" value="IMAGE" />
|
||||
<entry key="imageAsset" value="$PROJECT_DIR$/app/src/main/res/drawable/no-images.png" />
|
||||
<entry key="outputName" value="img_no_images" />
|
||||
<entry key="theme" value="HOLO_DARK" />
|
||||
<entry key="themeColor" value="ffffff" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="launcher">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="foregroundImage">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="color" value="000000" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="launcherLegacy">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="clipArt">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="color" value="000000" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="notification">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="clipArt">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="color" value="000000" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="outputIconType" value="ACTIONBAR" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="vectorWizard">
|
||||
<value>
|
||||
<PersistentState>
|
||||
|
Binary file not shown.
@ -15,9 +15,11 @@ import com.squareup.picasso.Picasso;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
import ru.volgorobot.vrcatalog.R;
|
||||
|
||||
public class ImagePagerAdapter extends PagerAdapter {
|
||||
/**
|
||||
* This class is designed to control the ViewPager (images of item) in the activity of viewing details of items.
|
||||
* This class is designed to control the ViewPager (images of item) in the activity of viewing details of items (DetailActivity).
|
||||
*/
|
||||
|
||||
private Context context;
|
||||
@ -26,6 +28,10 @@ public class ImagePagerAdapter extends PagerAdapter {
|
||||
public ImagePagerAdapter(Context context, String[] imageUris) {
|
||||
this.context = context;
|
||||
this.imageUris = imageUris;
|
||||
if(this.imageUris.length == 0) {
|
||||
this.imageUris = new String[1];
|
||||
this.imageUris[0] = Uri.parse("android.resource://ru.volgorobot.vrcatalog/" + R.drawable.no_images).toString();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,7 +9,7 @@ import me.texy.treeview.TreeNode;
|
||||
import me.texy.treeview.base.BaseNodeViewBinder;
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.R;
|
||||
import ru.volgorobot.vrcatalog.ViewBinderPresenter;
|
||||
import ru.volgorobot.vrcatalog.presenters.ViewBinderPresenter;
|
||||
import ru.volgorobot.vrcatalog.model.FirstLevelModel;
|
||||
|
||||
public class FirstLevelNodeViewBinder extends BaseNodeViewBinder implements MainContract.ViewBinder {
|
||||
|
@ -9,7 +9,7 @@ import me.texy.treeview.TreeNode;
|
||||
import me.texy.treeview.base.BaseNodeViewBinder;
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.R;
|
||||
import ru.volgorobot.vrcatalog.ViewBinderPresenter;
|
||||
import ru.volgorobot.vrcatalog.presenters.ViewBinderPresenter;
|
||||
import ru.volgorobot.vrcatalog.model.SecondLevelModel;
|
||||
|
||||
public class SecondLevelNodeViewBinder extends BaseNodeViewBinder implements MainContract.ViewBinder {
|
||||
|
@ -8,7 +8,7 @@ import me.texy.treeview.TreeNode;
|
||||
import me.texy.treeview.base.BaseNodeViewBinder;
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.R;
|
||||
import ru.volgorobot.vrcatalog.ViewBinderPresenter;
|
||||
import ru.volgorobot.vrcatalog.presenters.ViewBinderPresenter;
|
||||
import ru.volgorobot.vrcatalog.model.ThirdLevelModel;
|
||||
|
||||
public class ThirdLevelNodeViewBinder extends BaseNodeViewBinder implements MainContract.ViewBinder {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.volgorobot.vrcatalog;
|
||||
package ru.volgorobot.vrcatalog.presenters;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
@ -15,6 +15,7 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.additional.NetworkErrorException;
|
||||
import ru.volgorobot.vrcatalog.additional.ResultWithErrorCode;
|
||||
import ru.volgorobot.vrcatalog.model.CoreModel;
|
@ -1,10 +1,11 @@
|
||||
package ru.volgorobot.vrcatalog;
|
||||
package ru.volgorobot.vrcatalog.presenters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.additional.NetworkErrorException;
|
||||
import ru.volgorobot.vrcatalog.additional.ResultWithErrorCode;
|
||||
import ru.volgorobot.vrcatalog.model.CoreModel;
|
@ -1,4 +1,4 @@
|
||||
package ru.volgorobot.vrcatalog;
|
||||
package ru.volgorobot.vrcatalog.presenters;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -7,6 +7,7 @@ import android.os.AsyncTask;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import me.texy.treeview.TreeNode;
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.additional.NetworkErrorException;
|
||||
import ru.volgorobot.vrcatalog.model.CoreModel;
|
||||
import ru.volgorobot.vrcatalog.model.FirstLevelModel;
|
@ -1,4 +1,4 @@
|
||||
package ru.volgorobot.vrcatalog;
|
||||
package ru.volgorobot.vrcatalog.presenters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -7,6 +7,7 @@ import android.os.AsyncTask;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import me.texy.treeview.TreeNode;
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.additional.NetworkErrorException;
|
||||
import ru.volgorobot.vrcatalog.additional.ResultWithErrorCode;
|
||||
import ru.volgorobot.vrcatalog.model.CoreModel;
|
@ -7,8 +7,6 @@ import android.os.Bundle;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
@ -21,7 +19,7 @@ import android.widget.Toast;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import ru.volgorobot.vrcatalog.ItemPresenter;
|
||||
import ru.volgorobot.vrcatalog.presenters.ItemPresenter;
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.R;
|
||||
import ru.volgorobot.vrcatalog.additional.ImagePagerAdapter;
|
||||
|
@ -30,7 +30,7 @@ import java.util.ArrayList;
|
||||
import me.texy.treeview.TreeNode;
|
||||
import me.texy.treeview.TreeView;
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.MainPresenter;
|
||||
import ru.volgorobot.vrcatalog.presenters.MainPresenter;
|
||||
import ru.volgorobot.vrcatalog.R;
|
||||
import ru.volgorobot.vrcatalog.additional.NodeViewFactory;
|
||||
import ru.volgorobot.vrcatalog.model.FirstLevelModel;
|
||||
|
@ -21,7 +21,7 @@ import me.texy.treeview.TreeNode;
|
||||
import me.texy.treeview.TreeView;
|
||||
import ru.volgorobot.vrcatalog.MainContract;
|
||||
import ru.volgorobot.vrcatalog.R;
|
||||
import ru.volgorobot.vrcatalog.SearchablePresenter;
|
||||
import ru.volgorobot.vrcatalog.presenters.SearchablePresenter;
|
||||
import ru.volgorobot.vrcatalog.additional.RecentSuggestionProvider;
|
||||
import ru.volgorobot.vrcatalog.additional.SearchableNodeViewFactory;
|
||||
import ru.volgorobot.vrcatalog.model.FirstLevelModel;
|
||||
|
BIN
app/src/main/res/drawable/no_images.png
Normal file
BIN
app/src/main/res/drawable/no_images.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 748 B |
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?android:selectableItemBackground">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user