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

Fix Headline in share edit and user search

Andy Scherzinger 9 жил өмнө
parent
commit
d893654bc1

+ 1 - 1
AndroidManifest.xml

@@ -208,7 +208,7 @@
         <activity
             android:name=".ui.activity.ShareActivity"
             android:label="@string/share_dialog_title"
-            android:theme="@style/Theme.ownCloud.Dialog"
+            android:theme="@style/Theme.ownCloud.Dialog.NoTitle"
             android:launchMode="singleTop"
             android:windowSoftInputMode="adjustResize" >
             <intent-filter>

+ 8 - 0
res/layout/search_users_groups_layout.xml

@@ -25,6 +25,14 @@
     android:layout_marginRight="@dimen/standard_margin"
     android:layout_marginBottom="20dp">
 
+    <TextView
+        android:id="@+id/searchUserGroupsTitle"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/share_with_title"
+        android:textAppearance="@style/TextAppearance.AppCompat.Title"
+        android:padding="@dimen/standard_padding"/>
+
     <android.support.v7.widget.SearchView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 3 - 0
res/values/strings.xml

@@ -375,6 +375,7 @@
     <string name="pref_behaviour_entries_move">moved to app folder</string>
 
     <string name="share_dialog_title">Sharing</string>
+    <string name="share_file">Share %1$s</string>
     <string name="share_with_user_section_title">Share with users and groups</string>
     <string name="share_no_users">No data shared with users yet</string>
     <string name="share_add_user_or_group">Add user or group</string>
@@ -384,6 +385,8 @@
     <string name="share_via_link_password_title">Secured</string>
     <string name="share_via_link_edit_permission_label">Allow editing</string>
     <string name="share_get_public_link_button">Get link</string>
+    <string name="share_with_title">Share with &#8230;</string>
+    <string name="share_with_edit_title">Share with %1$s</string>
 
     <string name="share_search">Search</string>
 

+ 5 - 0
res/values/styles.xml

@@ -143,6 +143,11 @@
 		<item name="buttonBarStyle">@style/Theme.ownCloud.Dialog.ButtonBar</item>
 	</style>
 
+	<style name="Theme.ownCloud.Dialog.NoTitle" parent="style/Theme.ownCloud.Dialog">
+		<item name="windowNoTitle">true</item>
+		<item name="colorAccent">@color/owncloud_blue_accent</item>
+	</style>
+
 	<style name="Theme.ownCloud.Dialog.NoButtonBarStyle" parent="style/Theme.AppCompat.Light.Dialog.Alert">
 		<item name="windowNoTitle">false</item>
 		<item name="colorAccent">@color/owncloud_blue_accent</item>

+ 2 - 1
src/com/owncloud/android/ui/dialog/SharePasswordDialogFragment.java

@@ -83,7 +83,8 @@ public class SharePasswordDialogFragment extends DialogFragment
         inputText.requestFocus();
 
         // Build the dialog
-        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(),
+                R.style.Theme_ownCloud_Dialog_NoButtonBarStyle);
         builder.setView(v)
                .setPositiveButton(R.string.common_ok, this)
                .setNegativeButton(R.string.common_cancel, this)

+ 1 - 1
src/com/owncloud/android/ui/fragment/SearchShareesFragment.java

@@ -147,7 +147,7 @@ public class SearchShareesFragment extends Fragment implements ShareUserListAdap
     public void onActivityCreated(Bundle savedInstanceState) {
         super.onActivityCreated(savedInstanceState);
 
-        getActivity().setTitle(R.string.share_dialog_title);
+        getActivity().setTitle(R.string.share_with_title);
 
         // Load data into the list
         refreshUsersOrGroupsListFromDB();