first changes due to designers review

This commit is contained in:
AndyScherzinger 2018-05-28 17:30:55 +02:00
parent d8c4be0604
commit f201a2dd66
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
7 changed files with 20 additions and 25 deletions

View file

@ -281,8 +281,7 @@ public class FileDetailSharingFragment extends Fragment implements UserListAdapt
);
FileDetailSharingFragmentHelper.setupPasswordMenuItem(
menu.findItem(R.id.action_share_link_password),
publicShare.isPasswordProtected(),
res
publicShare.isPasswordProtected()
);
FileDetailSharingFragmentHelper.setupExpirationDateMenuItem(
menu.findItem(R.id.action_share_link_expiration_date),

View file

@ -69,23 +69,15 @@ public class FileDetailSharingFragmentHelper {
*
* @param password the password {@link MenuItem}
* @param isPasswordProtected flag is a password is present
* @param res Resources to load the corresponding strings.
*/
public static void setupPasswordMenuItem(MenuItem password, boolean isPasswordProtected, Resources res) {
public static void setupPasswordMenuItem(MenuItem password, boolean isPasswordProtected) {
if (isPasswordProtected) {
password.setTitle(getPasswordTitle(res, R.string.share_via_link_password_title));
password.setTitle(R.string.share_password_title);
} else {
password.setTitle(getPasswordTitle(res, R.string.share_via_link_no_password_title));
password.setTitle(R.string.share_no_password_title);
}
}
private static String getPasswordTitle(Resources res, @StringRes int passwordValue) {
return res.getString(
R.string.share_via_link_menu_password_label,
res.getString(passwordValue)
);
}
/**
* sets up the expiration date {@link MenuItem}'s title based on the fact if an expiration date is present.
*
@ -100,10 +92,7 @@ public class FileDetailSharingFragmentHelper {
SimpleDateFormat.getDateInstance().format(new Date(expirationDateValue))
));
} else {
expirationDate.setTitle(res.getString(
R.string.share_expiration_date_label,
res.getString(R.string.share_via_link_menu_expiration_date_never)
));
expirationDate.setTitle(R.string.share_no_expiration_date_label);
}
}

View file

@ -52,6 +52,7 @@
android:ellipsize="middle"
android:text="@string/placeholder_filename"
android:textColor="@color/black"
android:textStyle="bold"
android:textSize="16sp" />
<LinearLayout
@ -186,6 +187,7 @@
android:layout_height="wrap_content"
app:tabGravity="center"
app:tabMode="fixed"
app:tabTextAppearance="@style/AppTabTextAppearance"
android:background="@color/white" />
<android.support.v4.view.ViewPager

View file

@ -58,6 +58,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textSize="16sp"
android:text="@string/edit_permission_label" />
<ImageView

View file

@ -63,7 +63,7 @@
android:layout_gravity="start|center"
android:textColor="@color/black"
android:layout_weight="1"
android:textSize="@dimen/two_line_secondary_text_size"
android:textSize="16sp"
android:paddingTop="@dimen/standard_half_padding"
android:paddingBottom="@dimen/standard_half_padding"
android:text="@string/share_via_link_section_title" />
@ -73,6 +73,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textSize="16sp"
android:text="@string/edit_permission_label"/>
<ImageView
@ -106,7 +107,7 @@
android:paddingLeft="@dimen/standard_padding"
android:paddingRight="@dimen/standard_padding"
android:text="@string/share_no_users"
android:textSize="@dimen/share_no_users_text_size" />
android:textSize="16sp" />
</LinearLayout>

View file

@ -479,13 +479,11 @@
<string name="share_no_users">No data shared with users yet</string>
<string name="share_add_user_or_group">Add user or group</string>
<string name="share_via_link_menu_password_label">Password protect (%1$s)</string>
<string name="share_expiration_date_label">Set expiration date (%1$s)</string>
<string name="share_via_link_menu_expiration_date_never">never</string>
<string name="share_expiration_date_label">Expires %1$s</string>
<string name="share_no_expiration_date_label">Set expiration date</string>
<string name="share_via_link_section_title">Share link</string>
<string name="share_via_link_expiration_date_label">Set expiration date</string>
<string name="share_via_link_password_label">Protect with password</string>
<string name="share_via_link_password_title">Secured</string>
<string name="share_via_link_no_password_title">none</string>
<string name="share_password_title">Password-protected</string>
<string name="share_no_password_title">Set password</string>
<string name="edit_permission_label">edit</string>
<string name="share_via_link_hide_file_listing_permission_label">Hide file listing</string>
<string name="share_get_public_link_button">Get link</string>

View file

@ -250,4 +250,9 @@
<item name="colorControlNormal">@color/login_text_color</item>
<item name="android:textColorHint">@color/login_text_color</item>
</style>
<style name="AppTabTextAppearance" parent="@style/TextAppearance.Design.Tab">
<item name="android:textSize">16sp</item>
<item name="textAllCaps">false</item>
</style>
</resources>