Browse Source

initial bug fix for the uploader

Andy Scherzinger 9 years ago
parent
commit
29d8288bd5

+ 41 - 21
res/layout/uploader_layout.xml

@@ -17,21 +17,30 @@
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-	android:layout_height="wrap_content"
-	android:orientation="vertical"
-	android:layout_width="wrap_content"
-	android:background="@color/white"
-	android:gravity="center">
-
-	<FrameLayout
-		android:layout_height="match_parent"
-		android:layout_width="match_parent"
-		android:id="@+id/upload_list"
-		android:layout_above="@+id/upload_actions">
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/upload_files_layout"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" >
+
+    <include
+        layout="@layout/toolbar_standard" />
+
+	<TextView android:layout_width="fill_parent"
+		android:text="@string/uploader_top_message"
+		android:layout_height="wrap_content"
+		android:id="@+id/drawer_username"
+		android:textColor="@android:color/black"
+		android:gravity="center_horizontal">
+	</TextView>
 
-		<ListView
-			android:id="@android:id/list"
+	<FrameLayout android:layout_height="fill_parent"
+		android:layout_width="fill_parent"
+		android:id="@+id/frameLayout1"
+		android:layout_weight="1">
+
+		<ListView android:id="@android:id/list"
 			android:layout_width="fill_parent"
 			android:layout_height="fill_parent"
 			android:divider="@color/list_divider_background"
@@ -41,12 +50,23 @@
 	</FrameLayout>
 
 	<LinearLayout
-	    android:id="@+id/upload_actions"
-	    android:layout_width="fill_parent"
-	    android:layout_height="wrap_content"
-	    android:layout_alignParentBottom="true"
-	    android:orientation="horizontal"
-	    android:padding="@dimen/standard_padding">
+		android:layout_width="match_parent"
+		android:layout_height="wrap_content"
+		android:orientation="horizontal">
+
+		<ImageView
+			android:layout_width="match_parent"
+			android:layout_height="1dp"
+			android:src="@drawable/uploader_list_separator"/>
+
+	</LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:orientation="horizontal"
+        android:padding="@dimen/standard_padding">
 
 		<android.support.v7.widget.AppCompatButton
 			android:theme="@style/Button"
@@ -68,4 +88,4 @@
 		    android:text="@string/uploader_btn_upload_text" />
 
 	</LinearLayout>
-</RelativeLayout>
+</LinearLayout>

+ 3 - 1
src/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java

@@ -380,13 +380,15 @@ public class ReceiveExternalFilesActivity extends FileActivity
 
     private void populateDirectoryList() {
         setContentView(R.layout.uploader_layout);
+        setupToolbar();
+        ActionBar actionBar = getSupportActionBar();
 
         ListView mListView = (ListView) findViewById(android.R.id.list);
         ActionBar actionBar = getSupportActionBar();
 
         String current_dir = mParents.peek();
         if (current_dir.equals("")) {
-            actionBar.setTitle(getString(R.string.uploader_top_message));
+            actionBar.setTitle(getString(R.string.default_display_name_for_root_folder));
         } else {
             actionBar.setTitle(current_dir);
         }

+ 1 - 0
src/com/owncloud/android/ui/adapter/NavigationDrawerListAdapter.java

@@ -40,6 +40,7 @@ import com.owncloud.android.ui.activity.FileActivity;
 
 import java.util.ArrayList;
 
+// TODO remove complete class as soon as account switcher v2 is implemented, keep it until then for inspiration
 public class NavigationDrawerListAdapter extends BaseAdapter {
 
     private final static String TAG  = NavigationDrawerListAdapter.class.getSimpleName();