跳至主要内容

android Params

  1.   //第一个参数为宽的设置,第二个参数为高的设置。   
  2.            LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(      
  3.                    LinearLayout.LayoutParams.FILL_PARENT,      
  4.                    LinearLayout.LayoutParams.WRAP_CONTENT      
  5.            );      
  6.            //调用addView()方法增加一个TextView到线性布局中   
  7.            mLayout.addView(textView, p);      

评论

此博客中的热门博文

android hide actionbar

public class MainActivity extends Activity { ActionBar actionBar; //声明ActionBar @Override protected void onCreate( Bundle savedInstanceState) { super .onCreate(savedInstanceState); setContentView( R .layout.activity_main); actionBar = getSupportActionBar(); //得 到ActionBar actionBar.hide(); //隐藏ActionBar } }

go url encoding

func  QueryUnescape func QueryUnescape (s string ) ( string , error ) QueryUnescape does the inverse transformation of QueryEscape, converting %AB into the byte 0xAB and '+' into ' ' (space). It returns an error if any % is not followed by two hexadecimal digits. func  QueryUnescape func QueryUnescape (s string ) ( string , error ) QueryUnescape does the inverse transformation of QueryEscape, converting %AB into the byte 0xAB and '+' into ' ' (space). It returns an error if any % is not followed by two hexadecimal digits.