跳至主要内容

博文

目前显示的是标签为“android”的博文

android listview multi choice arrayadapter

import  android.app.Activity;   import  android.os.Bundle;   import  android.view.View;   import  android.widget.AdapterView;   import  android.widget.AdapterView.OnItemClickListener;   import  android.widget.AdapterView.OnItemSelectedListener;   import  android.widget.ArrayAdapter;   import  android.widget.ListView;   public   class  ListCheckbox  extends  Activity  implements  OnItemClickListener,OnItemSelectedListener{        private  String contentString[];       ArrayAdapter arrayAdapter;       ListView mylist;        protected   void  onCreate(Bundle savedInstanceState) {            // TODO Auto-generate...

android Button add ripple effects

Method 1:  To Add Ripple Effect/Animation to a Android Button Just replace your button background attribute with  android:background="?attr/selectableItemBackground"  and your code looks like this. < Button android : layout_width = " match_parent " android : layout_height = " wrap_content " android : background = " ?attr/selectableItemBackground " android : text = " Click Me " /> view raw button_ripple_effect.xml  hosted with ❤ by  GitHub Method 2:  To Add Ripple Effect/Animation to a Android Button Using this method, you can customize ripple effect color. First, you have to create a xml file in your drawable resource directory. Create a  ripple_effect.xml  file and add following code. res/drawable/ripple_effect.xml <? xml version = " 1.0 " encoding = " utf-8 " ?> < ripple xmlns : android = " http://schemas.android.com/apk/res/andr...