More cleanup / refactoring: Name Fragments consistantly way

This commit is contained in:
Lennart Rosam 2012-04-14 18:55:15 +02:00
parent a66be3bc47
commit a29469016e
8 changed files with 14 additions and 13 deletions

View file

@ -114,7 +114,8 @@
<service android:name=".FileDownloader" >
</service>
<activity android:name=".ui.activity.FileDetailActivity" >
<activity android:name=".ui.activity.FileDetailActivity"
android:theme="@style/Theme.ownCloud">
</activity>
<activity
android:name=".ui.activity.LandingActivity"

View file

@ -8,6 +8,6 @@
android:id="@+id/fileDetail"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
class="eu.alefzero.owncloud.ui.fragment.FileDetail" />
class="eu.alefzero.owncloud.ui.fragment.FileDetailFragment" />
</LinearLayout>

View file

@ -8,7 +8,7 @@
android:id="@+id/fileList"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
class="eu.alefzero.owncloud.ui.fragment.FileList" >
class="eu.alefzero.owncloud.ui.fragment.FileListFragment" >
<!-- Preview: layout=@layout/list_layout -->
</fragment>
</LinearLayout>

View file

@ -25,7 +25,7 @@ import android.view.Window;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import eu.alefzero.owncloud.R;
import eu.alefzero.owncloud.ui.fragment.FileDetail;
import eu.alefzero.owncloud.ui.fragment.FileDetailFragment;
/**
* This activity displays the details of a file like
@ -34,7 +34,7 @@ import eu.alefzero.owncloud.ui.fragment.FileDetail;
*
*/
public class FileDetailActivity extends SherlockFragmentActivity {
private FileDetail mFileDetail;
private FileDetailFragment mFileDetail;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -43,7 +43,7 @@ protected void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.file_activity_details);
mFileDetail = new FileDetail();
mFileDetail = new FileDetailFragment();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.add(R.id.fileDetail, mFileDetail);
ft.commit();

View file

@ -46,7 +46,7 @@ import eu.alefzero.owncloud.R;
import eu.alefzero.owncloud.authenticator.AccountAuthenticator;
import eu.alefzero.owncloud.authenticator.AuthUtils;
import eu.alefzero.owncloud.datamodel.OCFile;
import eu.alefzero.owncloud.ui.fragment.FileList;
import eu.alefzero.owncloud.ui.fragment.FileListFragment;
import eu.alefzero.webdav.WebdavClient;
/**
@ -154,7 +154,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
startActivity(intent);
return;
}
((FileList) getSupportFragmentManager().findFragmentById(R.id.fileList))
((FileListFragment) getSupportFragmentManager().findFragmentById(R.id.fileList))
.onNavigateUp();
}

View file

@ -45,7 +45,7 @@ import eu.alefzero.owncloud.db.ProviderMeta.ProviderTableMeta;
* @author Bartek Przybylski
*
*/
public class FileDetail extends SherlockFragment implements OnClickListener {
public class FileDetailFragment extends SherlockFragment implements OnClickListener {
private Intent mIntent;
private View mView;
@ -106,7 +106,7 @@ public class FileDetail extends SherlockFragment implements OnClickListener {
View v = null;
if (getActivity().getIntent() != null && getActivity().getIntent().getStringExtra("FILE_ID") != null) {
v = inflater.inflate(R.layout.file_details, container, false);
v = inflater.inflate(R.layout.file_details_fragment, container, false);
mIntent = getActivity().getIntent();
setStuff(v);
} else {

View file

@ -38,12 +38,12 @@ import eu.alefzero.owncloud.ui.adapter.FileListListAdapter;
* @author Bartek Przybylski
*
*/
public class FileList extends FragmentListView {
public class FileListFragment extends FragmentListView {
private Account mAccount;
private Stack<String> mDirNames;
private Vector<OCFile> mFiles;
public FileList() {
public FileListFragment() {
mDirNames = new Stack<String>();
}
@ -78,7 +78,7 @@ public class FileList extends FragmentListView {
i.putExtra("FULL_PATH", file.getPath());
i.putExtra("FILE_ID", id_);
i.putExtra("ACCOUNT", mAccount);
FileDetail fd = (FileDetail) getFragmentManager().findFragmentById(R.id.fileDetail);
FileDetailFragment fd = (FileDetailFragment) getFragmentManager().findFragmentById(R.id.fileDetail);
if (fd != null) {
fd.setStuff(i);
} else {