mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 12:38:00 +01:00
create a separate folder for activities and adapters
This commit is contained in:
parent
497ca6b127
commit
0c56113037
7 changed files with 29 additions and 9 deletions
|
@ -12,7 +12,7 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".activities.MainActivity"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
@ -22,11 +22,11 @@
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".PhotosActivity"
|
android:name=".activities.PhotosActivity"
|
||||||
android:screenOrientation="portrait"/>
|
android:screenOrientation="portrait"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".PhotoActivity"
|
android:name=".activities.PhotoActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
|
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
|
||||||
</application>
|
</application>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package gallery.simplemobiletools.com;
|
package gallery.simplemobiletools.com.activities;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
|
@ -17,6 +17,11 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import gallery.simplemobiletools.com.Constants;
|
||||||
|
import gallery.simplemobiletools.com.Directory;
|
||||||
|
import gallery.simplemobiletools.com.R;
|
||||||
|
import gallery.simplemobiletools.com.adapters.DirectoryAdapter;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity implements OnItemClickListener {
|
public class MainActivity extends AppCompatActivity implements OnItemClickListener {
|
||||||
private List<Directory> dirs;
|
private List<Directory> dirs;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package gallery.simplemobiletools.com;
|
package gallery.simplemobiletools.com.activities;
|
||||||
|
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
@ -11,6 +11,10 @@ import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import gallery.simplemobiletools.com.Constants;
|
||||||
|
import gallery.simplemobiletools.com.R;
|
||||||
|
import gallery.simplemobiletools.com.adapters.MyPagerAdapter;
|
||||||
|
|
||||||
public class PhotoActivity extends AppCompatActivity {
|
public class PhotoActivity extends AppCompatActivity {
|
||||||
private int pos;
|
private int pos;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package gallery.simplemobiletools.com;
|
package gallery.simplemobiletools.com.activities;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
|
@ -13,6 +13,10 @@ import android.widget.GridView;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import gallery.simplemobiletools.com.Constants;
|
||||||
|
import gallery.simplemobiletools.com.R;
|
||||||
|
import gallery.simplemobiletools.com.adapters.PhotosAdapter;
|
||||||
|
|
||||||
public class PhotosActivity extends AppCompatActivity implements AdapterView.OnItemClickListener {
|
public class PhotosActivity extends AppCompatActivity implements AdapterView.OnItemClickListener {
|
||||||
private List<String> photos;
|
private List<String> photos;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package gallery.simplemobiletools.com;
|
package gallery.simplemobiletools.com.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -12,6 +12,9 @@ import com.bumptech.glide.Glide;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import gallery.simplemobiletools.com.Directory;
|
||||||
|
import gallery.simplemobiletools.com.R;
|
||||||
|
|
||||||
public class DirectoryAdapter extends BaseAdapter {
|
public class DirectoryAdapter extends BaseAdapter {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final List<Directory> dirs;
|
private final List<Directory> dirs;
|
|
@ -1,4 +1,4 @@
|
||||||
package gallery.simplemobiletools.com;
|
package gallery.simplemobiletools.com.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.v4.view.PagerAdapter;
|
import android.support.v4.view.PagerAdapter;
|
||||||
|
@ -11,6 +11,8 @@ import com.bumptech.glide.Glide;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import gallery.simplemobiletools.com.R;
|
||||||
|
|
||||||
public class MyPagerAdapter extends PagerAdapter {
|
public class MyPagerAdapter extends PagerAdapter {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final List<String> paths;
|
private final List<String> paths;
|
|
@ -1,4 +1,4 @@
|
||||||
package gallery.simplemobiletools.com;
|
package gallery.simplemobiletools.com.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -11,6 +11,8 @@ import com.bumptech.glide.Glide;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import gallery.simplemobiletools.com.R;
|
||||||
|
|
||||||
public class PhotosAdapter extends BaseAdapter {
|
public class PhotosAdapter extends BaseAdapter {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final List<String> photos;
|
private final List<String> photos;
|
Loading…
Reference in a new issue