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:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:name=".activities.MainActivity"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
@ -22,11 +22,11 @@
|
|||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".PhotosActivity"
|
||||
android:name=".activities.PhotosActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
<activity
|
||||
android:name=".PhotoActivity"
|
||||
android:name=".activities.PhotoActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
|
||||
</application>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package gallery.simplemobiletools.com;
|
||||
package gallery.simplemobiletools.com.activities;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
|
@ -17,6 +17,11 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
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 {
|
||||
private List<Directory> dirs;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package gallery.simplemobiletools.com;
|
||||
package gallery.simplemobiletools.com.activities;
|
||||
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
|
@ -11,6 +11,10 @@ import java.io.File;
|
|||
import java.util.ArrayList;
|
||||
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 {
|
||||
private int pos;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package gallery.simplemobiletools.com;
|
||||
package gallery.simplemobiletools.com.activities;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
|
@ -13,6 +13,10 @@ import android.widget.GridView;
|
|||
import java.util.ArrayList;
|
||||
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 {
|
||||
private List<String> photos;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package gallery.simplemobiletools.com;
|
||||
package gallery.simplemobiletools.com.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -12,6 +12,9 @@ import com.bumptech.glide.Glide;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import gallery.simplemobiletools.com.Directory;
|
||||
import gallery.simplemobiletools.com.R;
|
||||
|
||||
public class DirectoryAdapter extends BaseAdapter {
|
||||
private final Context context;
|
||||
private final List<Directory> dirs;
|
|
@ -1,4 +1,4 @@
|
|||
package gallery.simplemobiletools.com;
|
||||
package gallery.simplemobiletools.com.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.view.PagerAdapter;
|
||||
|
@ -11,6 +11,8 @@ import com.bumptech.glide.Glide;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import gallery.simplemobiletools.com.R;
|
||||
|
||||
public class MyPagerAdapter extends PagerAdapter {
|
||||
private final Context context;
|
||||
private final List<String> paths;
|
|
@ -1,4 +1,4 @@
|
|||
package gallery.simplemobiletools.com;
|
||||
package gallery.simplemobiletools.com.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -11,6 +11,8 @@ import com.bumptech.glide.Glide;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import gallery.simplemobiletools.com.R;
|
||||
|
||||
public class PhotosAdapter extends BaseAdapter {
|
||||
private final Context context;
|
||||
private final List<String> photos;
|
Loading…
Reference in a new issue