Back to project page 50AndroidHacks.
The source code is released under:
Apache License
If you think the Android project 50AndroidHacks listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.yftx.AndroidHacks.sectionLayout; /*from www.j av a2 s . c o m*/ import android.app.Activity; import android.os.Bundle; import com.github.yftx.AndroidHacks.R; /** * User: Liuzl * Date: 13-11-25 * * LinearLayout * ?horizontal????????view?layout_width ?0dp layout_height???? * vertical ?????layout_height?0dp layout_width???? * weight ??????? * A possible example would be a 200dp wide LinearLayout with its * android:weightSum set to 1. The width of the Button would be calculated as follows: * Button's width + Button's weight * 200 / sum(weight) * */ public class WeightActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.weight_activity); } }