fix nosuchmethoderror when viewing captions on API < 16

This commit is contained in:
Andrew Dolgov 2013-04-16 14:55:37 +04:00
parent 7b3d3a7d47
commit fbf7f20ae3

View File

@ -581,7 +581,11 @@ public class OnlineActivity extends CommonActivity {
dia.setTitle(es.get(0).attr("title")); dia.setTitle(es.get(0).attr("title"));
} }
TextView titleText = new TextView(this); TextView titleText = new TextView(this);
if (android.os.Build.VERSION.SDK_INT >= 16) {
titleText.setPaddingRelative(24, 24, 24, 24); titleText.setPaddingRelative(24, 24, 24, 24);
}
titleText.setTextSize(16); titleText.setTextSize(16);
titleText.setText(es.get(0).attr("title")); titleText.setText(es.get(0).attr("title"));
dia.setContentView(titleText); dia.setContentView(titleText);