仅将一段代码应用于特定屏幕尺寸的 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()));