问题
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...
回答1:
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.
Heres a sample in your manifest specify android:style/Theme.Translucent
<!-- Your Custom ListActivity -->
<activity android:name=".CustomListVIew"
android:theme="@android:style/Theme.Translucent"/>
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);
Now call you CustomListActivity from your another Activity in onCreate() by
statActivity(new Intent(AcivityA.this,CustomListActivity.class));
来源:https://stackoverflow.com/questions/4547511/how-can-i-display-a-listview-on-the-top-of-another-activity-in-android