1.先设置属性Android:singleline =“true”
2.再设置Android:imeOptions=“actionSearch”
private ArrayList singleElement(ArrayList dateCount) {
ArrayList newAl = new ArrayList();
for(Iterator it = dateCount.iterator(); it.hasNext();)
{
Object obj = it.next();
if(!newAl.contains(obj))
{
newAl.add(obj);
}
}
return newAl;
}
GradientDrawable background=(GradientDrawable)iv_test_background_changge.getBackground();
background.setColor(getResources().getColor(R.color.colorPrimaryDark));
第一步:现将图片截图下来
adb shell screencap -p /sdcard/screen.png
第二步:再将图片复制到电脑上
adb pull /sdcard/screen.png
Runtime.getRuntime().exec("inputkeyevent20");
执行exec中的String命令
//调用Activity的getLayoutInflater()
1.LayoutInflater inflater = getLayoutInflater();
2.LayoutInflater localinflater =(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
3. LayoutInflater inflater = LayoutInflater.from(context);