Skip to content

Commit

Permalink
localization: button labels to chooserView
Browse files Browse the repository at this point in the history
  • Loading branch information
codekidX committed Dec 20, 2016
1 parent 82235a6 commit f5dc8f9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

public class StorageChooserView {

public static String LABEL_SELECT;
public static String LABEL_SELECT = "Select";
public static String LABEL_CREATE = "Create";
public static String CHOOSER_HEADING;
public static String INTERNAL_STORAGE_TEXT;
public static String TOAST_FOLDER_CREATED = "Folder Created";
Expand All @@ -18,6 +19,10 @@ public static void setLabelSelect(String labelSelect) {
LABEL_SELECT = labelSelect;
}

public static void setLabelCreate(String labelCreate) {
LABEL_CREATE = labelCreate;
}

public static void setChooserHeading(String chooserHeading) {
CHOOSER_HEADING = chooserHeading;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ private View getLayout(LayoutInflater inflater, ViewGroup container) {
mNewFolderButtonHolder.setVisibility(View.GONE);
}

if(StorageChooserView.LABEL_SELECT != null) {
mSelectButton.setText(StorageChooserView.LABEL_SELECT);
}
// set label of buttons [localization]
mSelectButton.setText(StorageChooserView.LABEL_SELECT);
mCreateButton.setText(StorageChooserView.LABEL_CREATE);

mBackButton.setOnClickListener(mBackButtonClickListener);
mSelectButton.setOnClickListener(mSelectButtonClickListener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@

<Button
android:id="@+id/create_folder_button"
android:text="Create"
android:textColor="@android:color/white"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
Expand All @@ -119,7 +118,6 @@

<Button
android:id="@+id/select_button"
android:text="SELECT"
android:textColor="@color/colorPrimaryDark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
2 changes: 0 additions & 2 deletions storagechooser/src/main/res/layout/custom_storage_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@

<Button
android:id="@+id/create_folder_button"
android:text="Create"
android:textColor="@android:color/white"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
Expand All @@ -118,7 +117,6 @@

<Button
android:id="@+id/select_button"
android:text="SELECT"
android:textColor="@color/colorPrimaryDark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down

0 comments on commit f5dc8f9

Please sign in to comment.