mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 02:38:58 +03:00
Further Migration to ABS 4.0.1 - Updated remaining Fragments and
Activities. They now extend the correct classes
This commit is contained in:
parent
30c2ede8e5
commit
ab949b7d74
6 changed files with 35 additions and 27 deletions
|
@ -52,7 +52,8 @@
|
|||
</data>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.Preferences" >
|
||||
<activity android:name=".ui.activity.Preferences"
|
||||
android:theme="@style/Theme.ownCloud">
|
||||
</activity>
|
||||
<activity android:name=".ui.activity.PreferencesNewSessionewSession" >
|
||||
</activity>
|
||||
|
|
|
@ -18,20 +18,22 @@
|
|||
package eu.alefzero.owncloud.ui.activity;
|
||||
|
||||
|
||||
import eu.alefzero.owncloud.R;
|
||||
import eu.alefzero.owncloud.ui.fragment.FileDetail;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.view.Window;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
|
||||
import eu.alefzero.owncloud.R;
|
||||
import eu.alefzero.owncloud.ui.fragment.FileDetail;
|
||||
|
||||
/**
|
||||
* This activity displays the details of a file like
|
||||
* its name, its size and so on.
|
||||
* @author Bartek Przybylski
|
||||
*
|
||||
*/
|
||||
public class FileDetailActivity extends FragmentActivity {
|
||||
public class FileDetailActivity extends SherlockFragmentActivity {
|
||||
private FileDetail mFileDetail;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
*/
|
||||
package eu.alefzero.owncloud.ui.activity;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.app.AlertDialog;
|
||||
|
@ -25,7 +27,6 @@ import android.content.DialogInterface;
|
|||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
|
@ -40,7 +41,7 @@ import eu.alefzero.owncloud.ui.adapter.LandingScreenAdapter;
|
|||
* @author Lennart Rosam
|
||||
*
|
||||
*/
|
||||
public class LandingActivity extends FragmentActivity implements OnClickListener, OnItemClickListener {
|
||||
public class LandingActivity extends SherlockFragmentActivity implements OnClickListener, OnItemClickListener {
|
||||
|
||||
public static final int DIALOG_SETUP_ACCOUNT = 1;
|
||||
|
||||
|
|
|
@ -21,12 +21,6 @@ import java.net.URI;
|
|||
import java.net.URISyntaxException;
|
||||
import java.util.Vector;
|
||||
|
||||
import eu.alefzero.owncloud.OwnCloudSession;
|
||||
import eu.alefzero.owncloud.R;
|
||||
import eu.alefzero.owncloud.authenticator.AccountAuthenticator;
|
||||
import eu.alefzero.owncloud.authenticator.AuthUtils;
|
||||
import eu.alefzero.owncloud.db.DbHandler;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.app.Activity;
|
||||
|
@ -34,23 +28,30 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView.AdapterContextMenuInfo;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockPreferenceActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import eu.alefzero.owncloud.OwnCloudSession;
|
||||
import eu.alefzero.owncloud.R;
|
||||
import eu.alefzero.owncloud.authenticator.AccountAuthenticator;
|
||||
import eu.alefzero.owncloud.authenticator.AuthUtils;
|
||||
import eu.alefzero.owncloud.db.DbHandler;
|
||||
|
||||
/**
|
||||
* An Activity that allows the user to change the application's settings.
|
||||
* @author Bartek Przybylski
|
||||
*
|
||||
*/
|
||||
public class Preferences extends PreferenceActivity {
|
||||
public class Preferences extends SherlockPreferenceActivity {
|
||||
private static final String TAG = "OwnCloudPreferences";
|
||||
private final int mNewSession = 47;
|
||||
private final int mEditSession = 48;
|
||||
|
@ -119,7 +120,7 @@ public class Preferences extends PreferenceActivity {
|
|||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
MenuInflater inflater = getSherlock().getMenuInflater();
|
||||
inflater.inflate(R.menu.prefs_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
@ -183,8 +184,8 @@ public class Preferences extends PreferenceActivity {
|
|||
mSelectedMenuItem = info.position-1;
|
||||
menu.setHeaderTitle(mSessions.get(mSelectedMenuItem).getName());
|
||||
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.session_context_menu, menu);
|
||||
MenuInflater inflater = getSherlock().getMenuInflater();
|
||||
inflater.inflate(R.menu.session_context_menu, (Menu) menu);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -24,15 +24,17 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.VideoView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
|
||||
import eu.alefzero.owncloud.DisplayUtils;
|
||||
import eu.alefzero.owncloud.FileDownloader;
|
||||
import eu.alefzero.owncloud.R;
|
||||
|
@ -43,7 +45,7 @@ import eu.alefzero.owncloud.db.ProviderMeta.ProviderTableMeta;
|
|||
* @author Bartek Przybylski
|
||||
*
|
||||
*/
|
||||
public class FileDetail extends Fragment implements OnClickListener {
|
||||
public class FileDetail extends SherlockFragment implements OnClickListener {
|
||||
|
||||
private Intent mIntent;
|
||||
private View mView;
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
*/
|
||||
package eu.alefzero.owncloud.ui.fragment;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -34,7 +35,7 @@ import eu.alefzero.owncloud.ui.adapter.LandingScreenAdapter;
|
|||
* @author Lennart Rosam
|
||||
*
|
||||
*/
|
||||
public class LandingPageFragment extends Fragment {
|
||||
public class LandingPageFragment extends SherlockFragment {
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
|
|
Loading…
Reference in a new issue