标签:
打开SimpleActivity.java.ftl,删除下列代码
1 @Override 2 public boolean onCreateOptionsMenu(Menu menu) { 3 // Inflate the menu; this adds items to the action bar if it is present. 4 getMenuInflater().inflate(R.menu.${menuName}, menu); 5 return true; 6 } 7 8 @Override 9 public boolean onOptionsItemSelected(MenuItem item) { 10 // Handle action bar item clicks here. The action bar will 11 // automatically handle clicks on the Home/Up button, so long 12 // as you specify a parent activity in AndroidManifest.xml. 13 int id = item.getItemId(); 14 if (id == R.id.action_settings) { 15 return true; 16 } 17 return super.onOptionsItemSelected(item); 18 }
删除无用的两个import语句
1 import android.view.Menu; 2 import android.view.MenuItem;
打开activity_simple.xml.ftl,替换成下列代码
1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" 5 android:orientation="vertical"> 6 7 <TextView 8 android:text="@string/hello_world" 9 android:layout_width="wrap_content" 10 android:layout_height="wrap_content" /> 11 12 </LinearLayout>
标签:
原文地址:http://www.cnblogs.com/WangKangReg/p/4328422.html