1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 19:31:30 +00:00

Move Activities and Fragments into seperate folders.

This commit is contained in:
Felix Ableitner 2014-08-03 23:08:56 +02:00
parent d2e0c291b6
commit d78319ee00
12 changed files with 35 additions and 26 deletions

View file

@ -22,7 +22,7 @@
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" > android:theme="@style/AppTheme" >
<activity <activity
android:name=".gui.MainActivity" android:name=".activities.MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleTop" > android:launchMode="singleTop" >
<intent-filter> <intent-filter>
@ -32,14 +32,14 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name=".gui.WebGuiActivity" android:name=".activities.WebGuiActivity"
android:label="@string/web_gui_title" > android:label="@string/web_gui_title" >
<meta-data <meta-data
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value=".gui.MainActivity" /> android:value=".gui.MainActivity" />
</activity> </activity>
<activity <activity
android:name=".gui.SettingsActivity" > android:name=".activities.SettingsActivity" >
<meta-data <meta-data
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value=".gui.MainActivity" /> android:value=".gui.MainActivity" />
@ -48,7 +48,7 @@
<service android:name=".syncthing.SyncthingService" /> <service android:name=".syncthing.SyncthingService" />
<activity <activity
android:name=".gui.FolderPickerActivity" android:name=".activities.FolderPickerActivity"
android:label="@string/folder_picker_title" > android:label="@string/folder_picker_title" >
<meta-data <meta-data
android:name="android.support.UI_OPTIONS" android:name="android.support.UI_OPTIONS"

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.activities;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.activities;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.AlertDialog; import android.app.AlertDialog;
@ -30,13 +30,16 @@ import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.fragments.LocalNodeInfoFragment;
import com.nutomic.syncthingandroid.fragments.NodesFragment;
import com.nutomic.syncthingandroid.fragments.ReposFragment;
import com.nutomic.syncthingandroid.syncthing.RestApi; import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService; import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder; import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
/** /**
* Shows {@link ReposFragment} and {@link NodesFragment} in different tabs, and * Shows {@link com.nutomic.syncthingandroid.fragments.ReposFragment} and {@link com.nutomic.syncthingandroid.fragments.NodesFragment} in different tabs, and
* {@link LocalNodeInfoFragment} in the navigation drawer. * {@link com.nutomic.syncthingandroid.fragments.LocalNodeInfoFragment} in the navigation drawer.
*/ */
public class MainActivity extends ActionBarActivity public class MainActivity extends ActionBarActivity
implements SyncthingService.OnApiChangeListener { implements SyncthingService.OnApiChangeListener {

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.activities;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
@ -6,6 +6,9 @@ import android.support.v4.app.FragmentManager;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.fragments.NodeSettingsFragment;
import com.nutomic.syncthingandroid.fragments.RepoSettingsFragment;
import com.nutomic.syncthingandroid.fragments.SettingsFragment;
/** /**
* General Activity used by all PreferenceFragments. * General Activity used by all PreferenceFragments.
@ -23,8 +26,8 @@ public class SettingsActivity extends ActionBarActivity {
* {@link #ACTION_REPO_SETTINGS_FRAGMENT} to determine if an existing repo/node should be * {@link #ACTION_REPO_SETTINGS_FRAGMENT} to determine if an existing repo/node should be
* edited or a new one created. * edited or a new one created.
* *
* If this is false, {@link RepoSettingsFragment#EXTRA_REPO_ID} or * If this is false, {@link com.nutomic.syncthingandroid.fragments.RepoSettingsFragment#EXTRA_REPO_ID} or
* {@link NodeSettingsFragment#EXTRA_NODE_ID} must be set (according to the selected fragment). * {@link com.nutomic.syncthingandroid.fragments.NodeSettingsFragment#EXTRA_NODE_ID} must be set (according to the selected fragment).
*/ */
public static final String EXTRA_IS_CREATE = "create"; public static final String EXTRA_IS_CREATE = "create";

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.activities;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.ComponentName; import android.content.ComponentName;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.fragments;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
@ -13,6 +13,7 @@ import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.MainActivity;
import com.nutomic.syncthingandroid.syncthing.RestApi; import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService; import com.nutomic.syncthingandroid.syncthing.SyncthingService;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.fragments;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
@ -21,6 +21,7 @@ import android.view.View;
import android.widget.Toast; import android.widget.Toast;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.syncthing.RestApi; import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService; import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder; import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.fragments;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
@ -8,6 +8,8 @@ import android.widget.AdapterView;
import android.widget.ListView; import android.widget.ListView;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.MainActivity;
import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.syncthing.SyncthingService; import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.util.NodesAdapter; import com.nutomic.syncthingandroid.util.NodesAdapter;

View file

@ -1,7 +1,5 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.fragments;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.ComponentName; import android.content.ComponentName;
@ -9,7 +7,6 @@ import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.ServiceConnection; import android.content.ServiceConnection;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Environment; import android.os.Environment;
import android.os.IBinder; import android.os.IBinder;
@ -24,6 +21,8 @@ import android.view.MenuItem;
import android.widget.Toast; import android.widget.Toast;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.FolderPickerActivity;
import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.syncthing.RestApi; import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService; import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder; import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
@ -42,7 +41,7 @@ public class RepoSettingsFragment extends PreferenceFragment
private static final int DIRECTORY_REQUEST_CODE = 234; private static final int DIRECTORY_REQUEST_CODE = 234;
/** /**
* The ID of the repo to be edited. To be used with {@link SettingsActivity#EXTRA_IS_CREATE} * The ID of the repo to be edited. To be used with {@link com.nutomic.syncthingandroid.activities.SettingsActivity#EXTRA_IS_CREATE}
* set to false. * set to false.
*/ */
public static final String EXTRA_REPO_ID = "repo_id"; public static final String EXTRA_REPO_ID = "repo_id";

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.fragments;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
@ -7,6 +7,8 @@ import android.view.View;
import android.widget.AdapterView; import android.widget.AdapterView;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.MainActivity;
import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.syncthing.SyncthingService; import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.util.ReposAdapter; import com.nutomic.syncthingandroid.util.ReposAdapter;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.gui; package com.nutomic.syncthingandroid.fragments;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;
@ -10,7 +10,6 @@ import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference; import android.preference.EditTextPreference;
import android.preference.Preference; import android.preference.Preference;
import android.preference.PreferenceScreen; import android.preference.PreferenceScreen;
import android.support.v4.app.Fragment;
import android.support.v4.app.NavUtils; import android.support.v4.app.NavUtils;
import android.support.v4.preference.PreferenceFragment; import android.support.v4.preference.PreferenceFragment;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;

View file

@ -17,9 +17,8 @@ import android.util.Log;
import android.util.Pair; import android.util.Pair;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.gui.MainActivity; import com.nutomic.syncthingandroid.activities.MainActivity;
import com.nutomic.syncthingandroid.gui.SettingsActivity; import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.gui.SettingsFragment;
import com.nutomic.syncthingandroid.util.ConfigXml; import com.nutomic.syncthingandroid.util.ConfigXml;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;