Эх сурвалжийг харах

Renamed SearchFragment to SearchShareesFragment

David A. Velasco 9 жил өмнө
parent
commit
f91241566a

+ 5 - 8
src/com/owncloud/android/ui/activity/ShareActivity.java

@@ -26,7 +26,6 @@ import android.content.Intent;
 import android.net.Uri;
 import android.os.Bundle;
 import android.support.v4.app.FragmentTransaction;
-import android.widget.Toast;
 
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
@@ -38,10 +37,8 @@ import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.resources.shares.OCShare;
 import com.owncloud.android.lib.resources.shares.ShareType;
 import com.owncloud.android.operations.CreateShareWithShareeOperation;
-import com.owncloud.android.operations.UnshareOperation;
-import com.owncloud.android.ui.fragment.SearchFragment;
+import com.owncloud.android.ui.fragment.SearchShareesFragment;
 import com.owncloud.android.ui.fragment.ShareFileFragment;
-import com.owncloud.android.utils.ErrorMessageAdapter;
 import com.owncloud.android.utils.GetShareWithUsersAsyncTask;
 
 import java.util.ArrayList;
@@ -52,7 +49,7 @@ import java.util.ArrayList;
 
 public class ShareActivity extends FileActivity
         implements ShareFileFragment.OnShareFragmentInteractionListener,
-        SearchFragment.OnSearchFragmentInteractionListener {
+        SearchShareesFragment.OnSearchFragmentInteractionListener {
 
     private static final String TAG = ShareActivity.class.getSimpleName();
 
@@ -62,7 +59,7 @@ public class ShareActivity extends FileActivity
     private static final String DIALOG_WAIT_LOAD_DATA = "DIALOG_WAIT_LOAD_DATA";
 
     private ShareFileFragment mShareFileFragment;
-    private SearchFragment mSearchFragment;
+    private SearchShareesFragment mSearchFragment;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -77,7 +74,7 @@ public class ShareActivity extends FileActivity
 
             mShareFileFragment = (ShareFileFragment) getSupportFragmentManager().
                     getFragment(savedInstanceState, TAG_SHARE_FRAGMENT);
-            mSearchFragment = (SearchFragment) getSupportFragmentManager().
+            mSearchFragment = (SearchShareesFragment) getSupportFragmentManager().
                     getFragment(savedInstanceState, TAG_SEARCH_FRAGMENT);
 
             if (mShareFileFragment != null){
@@ -152,7 +149,7 @@ public class ShareActivity extends FileActivity
     @Override
     public void showSearchUsersAndGroups(ArrayList<OCShare> shares) {
         FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
-        mSearchFragment = SearchFragment.newInstance(getFile(), getAccount(), shares);
+        mSearchFragment = SearchShareesFragment.newInstance(getFile(), getAccount(), shares);
         ft.hide(mShareFileFragment);
         ft.add(R.id.share_fragment_container, mSearchFragment, TAG_SEARCH_FRAGMENT);
         ft.addToBackStack(TAG_SEARCH_FRAGMENT);

+ 9 - 9
src/com/owncloud/android/ui/fragment/SearchFragment.java → src/com/owncloud/android/ui/fragment/SearchShareesFragment.java

@@ -49,13 +49,13 @@ import java.util.ArrayList;
  *
  * A simple {@link Fragment} subclass.
  * Activities that contain this fragment must implement the
- * {@link SearchFragment.OnSearchFragmentInteractionListener} interface
+ * {@link SearchShareesFragment.OnSearchFragmentInteractionListener} interface
  * to handle interaction events.
- * Use the {@link SearchFragment#newInstance} factory method to
+ * Use the {@link SearchShareesFragment#newInstance} factory method to
  * create an instance of this fragment.
  */
-public class SearchFragment extends Fragment implements ShareUserListAdapter.ShareUserAdapterListener {
-    private static final String TAG = SearchFragment.class.getSimpleName();
+public class SearchShareesFragment extends Fragment implements ShareUserListAdapter.ShareUserAdapterListener {
+    private static final String TAG = SearchShareesFragment.class.getSimpleName();
 
     // the fragment initialization parameters
     private static final String ARG_FILE = "FILE";
@@ -71,16 +71,16 @@ public class SearchFragment extends Fragment implements ShareUserListAdapter.Sha
     private OnSearchFragmentInteractionListener mListener;
 
     /**
-     * Public factory method to create new SearchFragment instances.
+     * Public factory method to create new SearchShareesFragment instances.
      *
      * @param fileToShare   An {@link OCFile} to show in the fragment
      * @param account       An ownCloud account
      * @param
-     * @return A new instance of fragment SearchFragment.
+     * @return A new instance of fragment SearchShareesFragment.
      */
     // TODO: Rename and change types and number of parameters
-    public static SearchFragment newInstance(OCFile fileToShare, Account account, ArrayList<OCShare> shares) {
-        SearchFragment fragment = new SearchFragment();
+    public static SearchShareesFragment newInstance(OCFile fileToShare, Account account, ArrayList<OCShare> shares) {
+        SearchShareesFragment fragment = new SearchShareesFragment();
         Bundle args = new Bundle();
         args.putParcelable(ARG_FILE, fileToShare);
         args.putParcelable(ARG_ACCOUNT, account);
@@ -89,7 +89,7 @@ public class SearchFragment extends Fragment implements ShareUserListAdapter.Sha
         return fragment;
     }
 
-    public SearchFragment() {
+    public SearchShareesFragment() {
         // Required empty public constructor
     }