我怎么可以显示在Android的另一个活动的顶部的列表视图 [英] how can i display a listview on the top of another activity in Android

查看:103
本文介绍了我怎么可以显示在Android的另一个活动的顶部的列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义列表视图屏幕和其他活动的屏幕,但现在我想显示自定义列表视图屏幕上的另一个活动之上。

i am having a custom list view screen and another activity screen but now i want to display the custom list view screen is on top of the another activity ..

感谢您的帮助......

thanks for help...

推荐答案

那么你首先应该真的说明你真正期望的那样下议院盖伊说。

Well you should firstly really specify what you really expect as Commons Guy said.

但据我可以设置主题半透明实现这一目标。

But according to me you can set theme Translucent to achieve that.

下面有你的清单样品指定安卓风格/ Theme.Translucent

Heres a sample in your manifest specify android:style/Theme.Translucent

<!-- Your Custom ListActivity  -->
<activity android:name=".CustomListVIew"
        android:theme="@android:style/Theme.Translucent"/>

现在,如果你想虚化背景,呼唤从你自定义的ListView的setContentView()之前

now if you want to blur the background, before calling setContentView() from you Custom ListView

public class CustomListActivity extends ListActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
//NO NEED TO CALL BELOW METHOD IF YOU DON'T WANT BLUR
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
        WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
}
    setContentView(R.layout.main);

现在叫你CustomListActivity从你在的onCreate(),另一个活动由

Now call you CustomListActivity from your another Activity in onCreate() by

statActivity(new Intent(AcivityA.this,CustomListActivity.class));

这篇关于我怎么可以显示在Android的另一个活动的顶部的列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆