是否有可能在Android中覆盖这么多形状的图标

时间:2017-08-09 07:38:57

标签: android android-drawable

我使用图层列表来创建按钮形状并添加图像

myshape.xml

myshape.xml

我使用button类添加此adapter作为appcompact button的后台资源,因为此gridview位于public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = inflater.inflate(R.layout.menu_view_item, null); TextView textView = (TextView) v.findViewById(R.id.menuName); AppCompatButton appCompatButton = (AppCompatButton) v.findViewById(R.id.menuImage); appCompatButton.setBackgroundResource(menuList.get(position).getMenuImage()); textView.setText(menuList.get(position).getMenuName()); return v; }

myshape.xml

并指定主class中的ArrayList<MenuGridItem> menuList=new ArrayList<>(); menuList.add(new MenuGridItem("Home",R.drawable.myshape)); 文件,如

button

$("div.finder-form__input-value").on("click", function() { var drpdwn = $(this).data("select-dropdown"); $('.finder-form__dropdown').each(function() { $(this).addClass('hide'); }) $(drpdwn).removeClass('hide'); }); 中的图标太小,可以覆盖图标的某些百分比

1 个答案:

答案 0 :(得分:0)

我正在使用24dp素材图标现在我改为48dp ...现在图标大小几乎可以......

相关问题