Android 2 ~~ö~~~ááá
1. FrameLayout
Ö¡ ² ~~ö£;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%» · images» £;*úframelayout ö~~~~í~ó± ± ~~° imageView £ ;*************************************** imageView comment 'canonicalé £.
{0} {0} {0} {0} {0} {0} {0} {0 ¶ Ô ä ä° íó ¶ Ô £ ¿
~Úframelayout öð É ¶ É Ã Ö ö öview éöã Layout _ gravity Ê Ð µ μ Ï Ö
Code £°
<frameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/linearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" tools:context=".MainActivity" > </frameLayout>
§ **Í =£°
2. linearLayout ² ¼ ¾ ö< symbol · blank "http://www.bkjia.com/kf/ware/vc/" target = "_ blank" class = "keylink"> vcD4KPHA + Principal + juw.vcd4kpha + zai5/Principal + Principal/Principal + 09Pa1/ PW0NPSzrvWw6O/strong + strong/strong + 0Ke5 + 828o7o8L3A + CjxwPjxpbWcgc3JjPQ = "http://www.2cto.com/uploadfile/Collfiles/20141224/2014122409110324.jpg" alt = "\">
Code £°
?
Írö~~layoutparams {µ~ö~£
Code £°
btn = (Button) findViewById(R.id.btn1);btn.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT);if(i == 1){i = 0;lp.addRule(RelativeLayout.CENTER_IN_PARENT,RelativeLayout.TRUE);}else{i = 1;lp.addRule(RelativeLayout.ALIGN_PARENT_TOP,RelativeLayout.TRUE);}btn.setLayoutParams(lp);}});
4. É öö± ± ³ ¾ ° ¥ ± äé «
GradientDrawable £;ír ;************************************************** ³ ¾ ° ¥ ¥äçé ¿ö
Code £°
@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);int[] col = {Color.BLUE,Color.BLACK};GradientDrawable gd = new GradientDrawable(Orientation.TOP_BOTTOM, col);getWindow().setBackgroundDrawable(gd);}
§ **Í =£°