I spent a ton of time looking for a solution to this but have not found anything that seems similar to what I am experiencing. When I run my app on my G2 none of my textviews wrap text.(regardless of how large the views are.) If i run it on an emulator they wrap appropriately. None of my other apps seem to have this problem when deployed to my G2. I have power cycled my devices, recreated layouts, etc. This seems to even affect a standard alert dialog in this particular app. It is happening in all my activities. Has anyone seen anything like this or does anyone have an idea what I should be looking at?
Some code as requested...
AlertDialog.Builder eula = new AlertDialog.Builder(activity)
.setTitle(R.string.eula_title)
.setIcon(android.R.drawable.ic_dialog_info)
.setMessage(R.string.eula_text)
.setCancelable(accepted)
.setPositiveButton(R.string.eula_accept,
new android.content.DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
setAcceptedEula(activity);
dialog.dismiss();
mHandler.post(mSplashScreen.launch);
}
})
.setNegativeButton(R.string.eula_decline,
new android.content.DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
activity.finish();
}
});
eula.show();
Standard alert dialog won't wrap text. It shows one line that trails off the view.
OK so i figured it out.
I have a theme applied to my app with parent theme
Theme.Holo
.When I removed that theme as the parent my
textviews
started wrapping again! I don't know why other then when run on a device that doesn't understandTheme.Holo
it got confused.So I just created an additional
values-v13
directory and modified my themes. Sorry for the trouble folks.In addition to Larry McKenzie answer I had to set corresponding parameters to the TextView:
Example: