AndroidManifest.xml

<?xmlversion="1.0"encoding="utf-8"?>

<manifestxmlns:android="http://schemas.android.com/apk/res/android"

package="com.example.android.xxxx">

<applicationandroid:persistent="true"

android:label="@string/home_title"

android:icon="@drawable/ic_launcher_home">

<activityandroid:name="xxxxxxxx"

android:theme="@android:style/Theme.Translucent">

<intent-filter>

<actionandroid:name="android.intent.action.LAUCHER"/>

<categoryandroid:name="android.intent.category.DEFAULT"/>

</intent-filter>

</activity>

</application>

</manifest>

xxxxxxxx.java

packagecom.example.android.xxxx;

publicclassfpToolbarextendsActivity {

@Override

publicvoidonCreate(BundlesavedInstanceState) {

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);

LinearLayoutlayout2;

layout2 =newLinearLayout(this);

Button b =newButton(this);

Button b2 =newButton(this);

layout2.addView(b);

layout2.addView(b2);

layout2.setGravity(Gravity.BOTTOM|Gravity.LEFT);

layout2.setBackgroundDrawable(null);/*设置成透明,必须在AndroidManifest.xml中设置android:theme="@android:style/Theme.Translucent"*/

b.setText("test pop.");

b2.setText("hello!");

setContentView(layout2);

}

}

更多相关文章

  1. android中的Handler
  2. android WebView onJsAlert onJsConfirm
  3. Android(安卓)webView中调用JavaScript
  4. Android之快捷方式
  5. Android(安卓)权限全集
  6. Android(安卓)之 Gallery
  7. Android为HttpClient设置证书(用户名和密码)
  8. TextInputLayout,让输入框更有灵性
  9. Android(安卓)之 ProgressDialog用法介绍

随机推荐

  1. Android内存管理
  2. layer-list使用
  3. Android(安卓)FloatingActionButton控件
  4. android PopUp window的使用
  5. 部署Android(安卓)SDK 和Eclipse 插件
  6. Android在listview添加checkbox实现单选
  7. Android(安卓)中文API (94) —— MediaCont
  8. Android数据库工具ORM-greenDAO学习
  9. android6.0 状态栏添加图标 举例Location
  10. Android(安卓)开源项目