我怎么可以显示在Android的另一个活动的顶部的列表视图视图、我怎么、列表、Android

2023-09-05 05:17:33 作者:疼久了心會硬。

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

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));