I am trying to put some loooong text into an AlertDialog.
The only issue the default font size that is really too big, so I want to make it smaller.
Here are all the workaround I tried and their issues.
Workaround 1) Using a TextView and myView.setTextSize(12);
final TextView myView = new TextView(getApplicationContext());
myView.setText(myLongText);
myView.setTextSize(12);
final AlertDialog d = new AlertDialog.Builder(context)
.setPositiveButton(android.R.string.ok, null)
.setTitle(myTitle)
.setView(myView)
.create();
Issues: Layout is not scrolling
Workaround 2) making TextView scrollable.
message.setMovementMethod(LinkMovementMethod.getInstance());
Issues: Layout is scrolling, bute there is no "inertia" (don't know how to call that.. But I guess you understand.)
Workaround 3) Using a Scrollview.
That's what I am going to try, but I cannot believe there are no easier solutions...
question from:
https://stackoverflow.com/questions/6562924/changing-font-size-into-an-alertdialog 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…