<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/shortCut_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="快捷方式"
/>
<Button
android:id="@+id/exit_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="退出应用" />
</LinearLayout>
---------------------------------------------------------------------------
public class MainActivity extends Activity {
private Button shortCutBtn;原文地址:http://blog.csdn.net/true100/article/details/45037901