只適用於android設備的特定屏幕尺寸的一段代碼的最佳方式是什麼?Android:根據屏幕尺寸應用代碼的最佳方式
例子:
TextView textView = (TextView) rowView.findViewById(R.id.article_title_text);
// I would like to apply this code for only device Galaxy S3 mini (4" size)
textView.setText(Tools.cutTitleHomeForGalaxyMini(article.getTitle()));
// Else, i want to apply this code
textView.setText(Tools.cutTitleHome(article.getTitle()));