diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2012-11-04 02:04:54 +0100 |
---|---|---|
committer | DvTonder <david.vantonder@gmail.com> | 2012-11-04 09:33:49 -0500 |
commit | b0601629d55fb1da6a4241442a66058d87c18321 (patch) | |
tree | 4006084798850688d5901733b4af56b4da301f45 /src | |
parent | 4e9f8bb0ddecaf81a4226534d4c8b488a19d1044 (diff) | |
download | android_packages_apps_CMFileManager-b0601629d55fb1da6a4241442a66058d87c18321.tar.gz android_packages_apps_CMFileManager-b0601629d55fb1da6a4241442a66058d87c18321.tar.bz2 android_packages_apps_CMFileManager-b0601629d55fb1da6a4241442a66058d87c18321.zip |
CMFileManager : Allow rotation
Override onConfigurationChanged to help keep the state
intact and allow orientation change.
Patchset 2 : Override for other activities as well
Patchset 3 : Fixed scrollbars dialogs
Patchset 4 : Fixed landscape mode of picker activity
Patchset 5 : New landscape layout for NavigationActivity
Patchset 6 : Fix whitespace errors in copyright headers
Change-Id: Ibe52f0a0ebf0ea88d79dab1c8a06fb262d63ecb1
Diffstat (limited to 'src')
8 files changed, 179 insertions, 91 deletions
diff --git a/src/com/cyanogenmod/filemanager/activities/BookmarksActivity.java b/src/com/cyanogenmod/filemanager/activities/BookmarksActivity.java index 18e0f3d3..5436c698 100644 --- a/src/com/cyanogenmod/filemanager/activities/BookmarksActivity.java +++ b/src/com/cyanogenmod/filemanager/activities/BookmarksActivity.java @@ -20,6 +20,7 @@ import android.app.ActionBar; import android.app.Activity; import android.content.Intent; import android.content.pm.ActivityInfo; +import android.content.res.Configuration; import android.content.res.XmlResourceParser; import android.database.Cursor; import android.os.AsyncTask; @@ -150,13 +151,6 @@ public class BookmarksActivity extends Activity implements OnItemClickListener, // Is ChRooted? this.mChRooted = FileManagerApplication.getAccessMode().compareTo(AccessMode.SAFE) == 0; - //Request features - if (!AndroidHelper.isTablet(this)) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); - } else { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } - //Set in transition overridePendingTransition(R.anim.translate_to_right_in, R.anim.hold_out); @@ -182,6 +176,14 @@ public class BookmarksActivity extends Activity implements OnItemClickListener, } /** + * {@inheritDoc} + */ + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + } + + /** * Method that initializes the titlebar of the activity. */ private void initTitleActionBar() { diff --git a/src/com/cyanogenmod/filemanager/activities/ChangeLogActivity.java b/src/com/cyanogenmod/filemanager/activities/ChangeLogActivity.java index 96b6698b..76edbb68 100644 --- a/src/com/cyanogenmod/filemanager/activities/ChangeLogActivity.java +++ b/src/com/cyanogenmod/filemanager/activities/ChangeLogActivity.java @@ -77,7 +77,7 @@ public class ChangeLogActivity extends Activity implements OnCancelListener, OnD // Show a dialog AlertDialog dialog = DialogHelper.createAlertDialog( this, R.drawable.ic_launcher, - R.string.changelog_title, sb.toString(), false, true); + R.string.changelog_title, sb.toString(), false); dialog.setOnCancelListener(this); dialog.setOnDismissListener(this); dialog.show(); diff --git a/src/com/cyanogenmod/filemanager/activities/EditorActivity.java b/src/com/cyanogenmod/filemanager/activities/EditorActivity.java index e6e05ce9..9896ef46 100644 --- a/src/com/cyanogenmod/filemanager/activities/EditorActivity.java +++ b/src/com/cyanogenmod/filemanager/activities/EditorActivity.java @@ -23,6 +23,7 @@ import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.content.pm.ActivityInfo; +import android.content.res.Configuration; import android.os.AsyncTask; import android.os.Bundle; import android.text.Editable; @@ -265,13 +266,6 @@ public class EditorActivity extends Activity implements TextWatcher { Log.d(TAG, "EditorActivity.onCreate"); //$NON-NLS-1$ } - //Request features - if (!AndroidHelper.isTablet(this)) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); - } else { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } - //Set the main layout of the activity setContentView(R.layout.editor); @@ -292,6 +286,14 @@ public class EditorActivity extends Activity implements TextWatcher { } /** + * {@inheritDoc} + */ + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + } + + /** * Method that initializes the titlebar of the activity. */ private void initTitleActionBar() { diff --git a/src/com/cyanogenmod/filemanager/activities/HistoryActivity.java b/src/com/cyanogenmod/filemanager/activities/HistoryActivity.java index 902e374e..bc604caa 100644 --- a/src/com/cyanogenmod/filemanager/activities/HistoryActivity.java +++ b/src/com/cyanogenmod/filemanager/activities/HistoryActivity.java @@ -20,6 +20,7 @@ import android.app.ActionBar; import android.app.Activity; import android.content.Intent; import android.content.pm.ActivityInfo; +import android.content.res.Configuration; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; @@ -88,13 +89,6 @@ public class HistoryActivity extends Activity implements OnItemClickListener { this.mIsEmpty = false; this.mIsClearHistory = false; - //Request features - if (!AndroidHelper.isTablet(this)) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); - } else { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } - //Set in transition overridePendingTransition(R.anim.translate_to_right_in, R.anim.hold_out); @@ -113,6 +107,14 @@ public class HistoryActivity extends Activity implements OnItemClickListener { * {@inheritDoc} */ @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + } + + /** + * {@inheritDoc} + */ + @Override protected void onPause() { //Set out transition overridePendingTransition(R.anim.hold_in, R.anim.translate_to_left_out); diff --git a/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java b/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java index dc503e9d..0bd15d44 100644 --- a/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java +++ b/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java @@ -25,7 +25,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; -import android.content.pm.ActivityInfo; +import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.os.Parcelable; @@ -38,6 +38,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; +import android.widget.LinearLayout; import android.widget.ListPopupWindow; import android.widget.PopupWindow; import android.widget.Toast; @@ -70,6 +71,7 @@ import com.cyanogenmod.filemanager.ui.dialogs.ActionsDialog; import com.cyanogenmod.filemanager.ui.dialogs.FilesystemInfoDialog; import com.cyanogenmod.filemanager.ui.dialogs.FilesystemInfoDialog.OnMountListener; import com.cyanogenmod.filemanager.ui.widgets.Breadcrumb; +import com.cyanogenmod.filemanager.ui.widgets.ButtonItem; import com.cyanogenmod.filemanager.ui.widgets.NavigationCustomTitleView; import com.cyanogenmod.filemanager.ui.widgets.NavigationView; import com.cyanogenmod.filemanager.ui.widgets.NavigationView.OnNavigationRequestMenuListener; @@ -259,6 +261,8 @@ public class NavigationActivity extends Activity private View mOptionsAnchorView; + private int mOrientation; + /** * @hide */ @@ -288,13 +292,6 @@ public class NavigationActivity extends Activity //Set the main layout of the activity setContentView(R.layout.navigation); - //Request features - if (!AndroidHelper.isTablet(this)) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); - } else { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } - // Show welcome message showWelcomeMsg(); @@ -309,6 +306,13 @@ public class NavigationActivity extends Activity initStatusActionBar(); initSelectionBar(); + // Adjust layout (only when start on landscape mode) + int orientation = getResources().getConfiguration().orientation; + if (orientation == Configuration.ORIENTATION_LANDSCAPE) { + onLayoutChanged(); + } + this.mOrientation = orientation; + this.mHandler = new Handler(); this.mHandler.post(new Runnable() { @Override @@ -344,6 +348,15 @@ public class NavigationActivity extends Activity * {@inheritDoc} */ @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + onLayoutChanged(); + } + + /** + * {@inheritDoc} + */ + @Override protected void onDestroy() { if (DEBUG) { Log.d(TAG, "NavigationActivity.onDestroy"); //$NON-NLS-1$ @@ -401,7 +414,7 @@ public class NavigationActivity extends Activity if (firstUse) { AlertDialog dialog = DialogHelper.createAlertDialog( this, R.drawable.ic_launcher, - R.string.welcome_title, getString(R.string.welcome_msg), false, true); + R.string.welcome_title, getString(R.string.welcome_msg), false); dialog.show(); // Don't display again this dialog @@ -417,9 +430,10 @@ public class NavigationActivity extends Activity */ private void initTitleActionBar() { //Inflate the view and associate breadcrumb + View titleLayout = getLayoutInflater().inflate( + R.layout.navigation_view_customtitle, null, false); NavigationCustomTitleView title = - (NavigationCustomTitleView)getLayoutInflater().inflate( - R.layout.navigation_view_customtitle, null, false); + (NavigationCustomTitleView)titleLayout.findViewById(R.id.navigation_title_flipper); title.setOnHistoryListener(this); Breadcrumb breadcrumb = (Breadcrumb)title.findViewById(R.id.breadcrumb_view); int cc = this.mNavigationViews.length; @@ -442,7 +456,7 @@ public class NavigationActivity extends Activity getResources().getDrawable(R.drawable.bg_holo_titlebar)); getActionBar().setDisplayOptions( ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME); - getActionBar().setCustomView(title); + getActionBar().setCustomView(titleLayout); } /** @@ -483,7 +497,7 @@ public class NavigationActivity extends Activity this.mOptionsAnchorView = showOptionsMenu ? overflow : this.mActionBar; // Show the status bar - View statusBar = findViewById(R.id.navigation_statusbar); + View statusBar = findViewById(R.id.navigation_statusbar_portrait_holder); statusBar.setVisibility(View.VISIBLE); } @@ -1092,7 +1106,7 @@ public class NavigationActivity extends Activity * @return boolean Indicates if the action must be intercepted */ private boolean checkBackAction() { - // We need a basic structure to check this + // We need a basic structure to check this if (getCurrentNavigationView() == null) return false; //Check if the configuration view is showing. In this case back @@ -1453,4 +1467,73 @@ public class NavigationActivity extends Activity finish(); } + /** + * Method that reconfigures the layout for better fit in portrait and landscape modes + */ + private void onLayoutChanged() { + // Apply only when the orientation was changed + int orientation = getResources().getConfiguration().orientation; + if (this.mOrientation == orientation) return; + this.mOrientation = orientation; + + if (this.mOrientation == Configuration.ORIENTATION_LANDSCAPE) { + // Landscape mode + ViewGroup statusBar = (ViewGroup)findViewById(R.id.navigation_statusbar); + if (statusBar.getParent() != null) { + ViewGroup parent = (ViewGroup) statusBar.getParent(); + parent.removeView(statusBar); + } + + // Calculate the action button size (all the buttons must fit in the title bar) + int bw = (int)getResources().getDimension(R.dimen.default_buttom_width); + int abw = this.mActionBar.getChildCount() * bw; + int rbw = 0; + int cc = statusBar.getChildCount(); + for (int i = 0; i < cc; i++) { + View child = statusBar.getChildAt(i); + if (child instanceof ButtonItem) { + rbw += bw; + } + } + int w = abw + rbw; + boolean showOptionsMenu = AndroidHelper.showOptionsMenu(getApplicationContext()); + if (!showOptionsMenu) { + w -= bw; + } + + // Add to the new location + ViewGroup newParent = (ViewGroup)findViewById(R.id.navigation_title_landscape_holder); + LinearLayout.LayoutParams params = + new LinearLayout.LayoutParams( + w, + ViewGroup.LayoutParams.MATCH_PARENT); + statusBar.setLayoutParams(params); + newParent.addView(statusBar); + + // Hide holder + View holder = findViewById(R.id.navigation_statusbar_portrait_holder); + holder.setVisibility(View.GONE); + + } else { + // Portrait mode + ViewGroup statusBar = (ViewGroup)findViewById(R.id.navigation_statusbar); + if (statusBar.getParent() != null) { + ViewGroup parent = (ViewGroup) statusBar.getParent(); + parent.removeView(statusBar); + } + + // Add to the new location + ViewGroup newParent = (ViewGroup)findViewById(R.id.navigation_statusbar_portrait_holder); + LinearLayout.LayoutParams params = + new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT); + statusBar.setLayoutParams(params); + newParent.addView(statusBar); + + // Show holder + newParent.setVisibility(View.VISIBLE); + } + } + } diff --git a/src/com/cyanogenmod/filemanager/activities/PickerActivity.java b/src/com/cyanogenmod/filemanager/activities/PickerActivity.java index c20369de..a65c0e2f 100644 --- a/src/com/cyanogenmod/filemanager/activities/PickerActivity.java +++ b/src/com/cyanogenmod/filemanager/activities/PickerActivity.java @@ -22,7 +22,7 @@ import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnDismissListener; import android.content.Intent; -import android.content.pm.ActivityInfo; +import android.content.res.Configuration; import android.net.Uri; import android.os.Bundle; import android.os.Handler; @@ -48,7 +48,6 @@ import com.cyanogenmod.filemanager.ui.widgets.Breadcrumb; import com.cyanogenmod.filemanager.ui.widgets.ButtonItem; import com.cyanogenmod.filemanager.ui.widgets.NavigationView; import com.cyanogenmod.filemanager.ui.widgets.NavigationView.OnFilePickedListener; -import com.cyanogenmod.filemanager.util.AndroidHelper; import com.cyanogenmod.filemanager.util.DialogHelper; import com.cyanogenmod.filemanager.util.ExceptionUtil; import com.cyanogenmod.filemanager.util.FileHelper; @@ -77,6 +76,7 @@ public class PickerActivity extends Activity * @hide */ NavigationView mNavigationView; + private View mRootView; /** * {@inheritDoc} @@ -87,13 +87,6 @@ public class PickerActivity extends Activity Log.d(TAG, "PickerActivity.onCreate"); //$NON-NLS-1$ } - //Request features - if (!AndroidHelper.isTablet(this)) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); - } else { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } - // Initialize the activity init(); @@ -102,6 +95,15 @@ public class PickerActivity extends Activity } /** + * {@inheritDoc} + */ + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + measureHeight(); + } + + /** * Method that displays a dialog with a {@link NavigationView} to select the * proposed file */ @@ -124,25 +126,17 @@ public class PickerActivity extends Activity return; } - // Calculate the dialog size based on the window height - DisplayMetrics displaymetrics = new DisplayMetrics(); - getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); - final int height = displaymetrics.heightPixels; - // Create the root file - final View rootView = getLayoutInflater().inflate(R.layout.picker, null, false); - rootView.post(new Runnable() { + this.mRootView = getLayoutInflater().inflate(R.layout.picker, null, false); + this.mRootView.post(new Runnable() { @Override public void run() { - FrameLayout.LayoutParams params = - new FrameLayout.LayoutParams( - LayoutParams.WRAP_CONTENT, (height * 70) / 100); - rootView.setLayoutParams(params); + measureHeight(); } }); // Breadcrumb - Breadcrumb breadcrumb = (Breadcrumb)rootView.findViewById(R.id.breadcrumb_view); + Breadcrumb breadcrumb = (Breadcrumb)this.mRootView.findViewById(R.id.breadcrumb_view); // Set the free disk space warning level of the breadcrumb widget String fds = Preferences.getSharedPreferences().getString( FileManagerSettings.SETTINGS_DISK_USAGE_WARNING_LEVEL.getId(), @@ -151,14 +145,14 @@ public class PickerActivity extends Activity // Navigation view this.mNavigationView = - (NavigationView)rootView.findViewById(R.id.navigation_view); + (NavigationView)this.mRootView.findViewById(R.id.navigation_view); this.mNavigationView.setMimeType(this.mMimeType); this.mNavigationView.setOnFilePickedListener(this); this.mNavigationView.setBreadcrumb(breadcrumb); // Create the dialog this.mDialog = DialogHelper.createDialog( - this, R.drawable.ic_launcher, R.string.picker_title, rootView); + this, R.drawable.ic_launcher, R.string.picker_title, this.mRootView); this.mDialog.setButton( DialogInterface.BUTTON_NEUTRAL, getString(R.string.cancel), @@ -174,7 +168,7 @@ public class PickerActivity extends Activity this.mDialog.show(); // Set content description of storage volume button - ButtonItem fs = (ButtonItem)rootView.findViewById(R.id.ab_filesystem_info); + ButtonItem fs = (ButtonItem)this.mRootView.findViewById(R.id.ab_filesystem_info); fs.setContentDescription(getString(R.string.actionbar_button_storage_cd)); this.mHandler = new Handler(); @@ -189,6 +183,26 @@ public class PickerActivity extends Activity } /** + * Method that measure the height needed to avoid resizing when + * change to a new directory. This method fixed the height of the window + * @hide + */ + void measureHeight() { + // Calculate the dialog size based on the window height + DisplayMetrics displaymetrics = new DisplayMetrics(); + getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); + final int height = displaymetrics.heightPixels; + + Configuration config = getResources().getConfiguration(); + int percent = config.orientation == Configuration.ORIENTATION_LANDSCAPE ? 55 : 70; + + FrameLayout.LayoutParams params = + new FrameLayout.LayoutParams( + LayoutParams.WRAP_CONTENT, (height * percent) / 100); + this.mRootView.setLayoutParams(params); + } + + /** * Method that initializes a console */ private boolean initializeConsole() { diff --git a/src/com/cyanogenmod/filemanager/activities/SearchActivity.java b/src/com/cyanogenmod/filemanager/activities/SearchActivity.java index f4ced743..9f2136c1 100644 --- a/src/com/cyanogenmod/filemanager/activities/SearchActivity.java +++ b/src/com/cyanogenmod/filemanager/activities/SearchActivity.java @@ -26,6 +26,7 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ActivityInfo; +import android.content.res.Configuration; import android.os.Bundle; import android.os.Parcelable; import android.preference.PreferenceActivity; @@ -264,13 +265,6 @@ public class SearchActivity extends Activity filter.addAction(FileManagerSettings.INTENT_SETTING_CHANGED); registerReceiver(this.mOnSettingChangeReceiver, filter); - //Request features - if (!AndroidHelper.isTablet(this)) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); - } else { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } - //Set in transition overridePendingTransition(R.anim.translate_to_right_in, R.anim.hold_out); @@ -306,6 +300,14 @@ public class SearchActivity extends Activity * {@inheritDoc} */ @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + } + + /** + * {@inheritDoc} + */ + @Override protected void onNewIntent(Intent intent) { //New query if (Intent.ACTION_SEARCH.equals(getIntent().getAction())) { diff --git a/src/com/cyanogenmod/filemanager/util/DialogHelper.java b/src/com/cyanogenmod/filemanager/util/DialogHelper.java index ef2e3366..1b69f0b5 100644 --- a/src/com/cyanogenmod/filemanager/util/DialogHelper.java +++ b/src/com/cyanogenmod/filemanager/util/DialogHelper.java @@ -153,27 +153,10 @@ public final class DialogHelper { */ public static AlertDialog createAlertDialog( Context context, int icon, int title, String message, boolean allCaps) { - return createAlertDialog(context, icon, title, message, allCaps, false); - } - - /** - * Method that creates a new {@link AlertDialog}. - * - * @param context The current context - * @param icon The icon resource - * @param title The resource identifier of the title of the alert dialog - * @param message The message of the alert dialog - * @param allCaps If the title must have his text in caps or not - * @param scrolled If message need to be scrolled - * @return AlertDialog The alert dialog reference - */ - public static AlertDialog createAlertDialog( - Context context, int icon, int title, String message, - boolean allCaps, boolean scrolled) { //Create the alert dialog AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setCustomTitle(createTitle(context, icon, context.getString(title), allCaps)); - builder.setView(createMessage(context, message, scrolled)); + builder.setView(createMessage(context, message)); builder.setPositiveButton(context.getString(R.string.ok), null); return builder.create(); } @@ -276,7 +259,7 @@ public final class DialogHelper { 0, context.getString(title), false)); - builder.setView(createMessage(context, message, false)); + builder.setView(createMessage(context, message)); AlertDialog dialog = builder.create(); dialog.setButton( DialogInterface.BUTTON_POSITIVE, context.getString(R.string.yes), onClickListener); @@ -318,7 +301,7 @@ public final class DialogHelper { 0, context.getString(title), false)); - builder.setView(createMessage(context, message, false)); + builder.setView(createMessage(context, message)); AlertDialog dialog = builder.create(); dialog.setButton( DialogInterface.BUTTON_POSITIVE, context.getString(R.string.yes), onClickListener); @@ -351,7 +334,7 @@ public final class DialogHelper { 0, context.getString(title), false)); - builder.setView(createMessage(context, message, false)); + builder.setView(createMessage(context, message)); AlertDialog dialog = builder.create(); dialog.setButton( DialogInterface.BUTTON_POSITIVE, context.getString(button1), onClickListener); @@ -383,7 +366,7 @@ public final class DialogHelper { 0, context.getString(title), false)); - builder.setView(createMessage(context, message, false)); + builder.setView(createMessage(context, message)); AlertDialog dialog = builder.create(); dialog.setButton( DialogInterface.BUTTON_POSITIVE, context.getString(button1), onClickListener); @@ -459,12 +442,12 @@ public final class DialogHelper { * @param message The the message of the alert dialog * @return The title view */ - private static View createMessage(Context context, String message, boolean scrolled) { + private static View createMessage(Context context, String message) { //Inflate the dialog layouts LayoutInflater li = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View lyMessage = li.inflate( - scrolled ? R.layout.dialog_scrolled_message : R.layout.dialog_message, + R.layout.dialog_message, null); TextView vMsg = (TextView)lyMessage.findViewById(R.id.dialog_message); vMsg.setText(message); |