Small refactoring. (New package "adapters" and small changes (edit comments))

This commit is contained in:
ChronosX88 2019-02-20 20:31:56 +04:00
parent b92a9d0c58
commit 88a9da5f47
No known key found for this signature in database
GPG Key ID: 8F92E090A87804AA
6 changed files with 10 additions and 13 deletions

View File

@ -1,4 +1,4 @@
package ru.volgorobot.vrcatalog.additional;
package ru.volgorobot.vrcatalog.additional.adapters;
import android.content.Context;
import android.support.annotation.NonNull;
@ -16,7 +16,7 @@ import com.squareup.picasso.Picasso;
public class FullscreenImagePagerAdapter extends PagerAdapter {
/**
* This class is designed to control the ViewPager (images of item) in the activity of viewing details of items (DetailActivity).
* This class is designed to control the ViewPager (images of item) in FullscreenImageActivity.
*/
private Context context;
@ -64,6 +64,9 @@ public class FullscreenImagePagerAdapter extends PagerAdapter {
container.removeView((View) object);
}
/**
* Listener for hiding the actionbar when you click on the picture
*/
private class PhotoTapListener implements OnPhotoTapListener, View.OnSystemUiVisibilityChangeListener {
@Override
public void onPhotoTap(ImageView view, float x, float y) {

View File

@ -1,4 +1,4 @@
package ru.volgorobot.vrcatalog.additional;
package ru.volgorobot.vrcatalog.additional.adapters;
import android.content.Context;
import android.content.Intent;

View File

@ -1,4 +1,4 @@
package ru.volgorobot.vrcatalog.additional;
package ru.volgorobot.vrcatalog.additional.adapters;
import android.view.LayoutInflater;
import android.view.View;

View File

@ -22,9 +22,6 @@ import ru.volgorobot.vrcatalog.model.CoreModel;
import ru.volgorobot.vrcatalog.model.ImageItemModel;
public class ItemPresenter implements MainContract.ItemPresenter {
// TODO
private MainContract.ItemView mView;
private Context context;
private MainContract.MainModel coreModel;

View File

@ -10,9 +10,6 @@ import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
@ -22,8 +19,8 @@ import java.util.LinkedHashMap;
import ru.volgorobot.vrcatalog.presenters.ItemPresenter;
import ru.volgorobot.vrcatalog.MainContract;
import ru.volgorobot.vrcatalog.R;
import ru.volgorobot.vrcatalog.additional.ImagePagerAdapter;
import ru.volgorobot.vrcatalog.additional.PropertiesListAdapter;
import ru.volgorobot.vrcatalog.additional.adapters.ImagePagerAdapter;
import ru.volgorobot.vrcatalog.additional.adapters.PropertiesListAdapter;
public class DetailActivity extends AppCompatActivity implements MainContract.ItemView {
private MainContract.ItemPresenter mPresenter;

View File

@ -15,7 +15,7 @@ import android.view.Window;
import android.view.WindowManager;
import ru.volgorobot.vrcatalog.R;
import ru.volgorobot.vrcatalog.additional.FullscreenImagePagerAdapter;
import ru.volgorobot.vrcatalog.additional.adapters.FullscreenImagePagerAdapter;
public class FullScreenImageActivity extends AppCompatActivity {
private Toolbar mToolbar;