Custom dialog title for long text.

This commit is contained in:
Dmitry Yunitsky 2014-08-15 12:22:08 +03:00 committed by Alex Zolotarev
parent 83189d1d47
commit 4872a0427d
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,7 @@
<TextView
android:id="@+id/tv__title"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:textSize="18sp"
android:padding="@dimen/margin_medium"
android:layout_height="wrap_content"/>

View file

@ -1084,9 +1084,12 @@ public class MWMActivity extends NvEventQueueActivity
private void showPromoDialog()
{
final TextView textView = (TextView) getLayoutInflater().inflate(R.layout.title_share_dialog, null);
textView.setText(getString(R.string.maps_me_is_free_today_android));
new AlertDialog.Builder(MWMActivity.this)
.setCustomTitle(textView)
.setMessage(getString(R.string.maps_me_is_free_today_facebook_post_android))
.setTitle(getString(R.string.maps_me_is_free_today_android))
.setCancelable(true)
.setPositiveButton(R.string.share, new Dialog.OnClickListener()
{