2014-01-28 25 views
1

我想创建一个透明的Activity,当我们在另一个Activity之上打开应用程序时,加载的内容与this完全相同。如何在Android中使用图片创建透明活动?

我想可以点击该图片,然后打开浏览器,打开与此图像

我怎样才能实现这一集成的联系?

+0

我想这可能是有用的http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android?rq=1 –

+0

对话的对话=新的对话框(WelcomeScreenActivity。这,R.style.CustomDialogTheme); WindowManager.LayoutParams WMLP = dialog.getWindow()。getAttributes(); \t \t \t \t WMLP.x = 0; \t \t \t \t WMLP.y = 0; \t \t \t \t WMLP.dimAmount = 0.0f; \t \t \t \t dialog.getWindow()。setAttributes(WMLP); \t \t \t \t dialog.show();这在代码将此在style.xml中添加 – kumar

+0

@kumar请在哪里添加图片和链接? – user3244729

回答

0
<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/root" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
android:background="@android:color/transparent" 
    android:orientation="vertical" > 

    <ImageView 
    android:id="@+id/imageView1" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_centerHorizontal="true" 
    android:layout_centerVertical="true" 
    android:padding="2dp" 
    android:background="@drawable/videobackground" 
    /> 

</RelativeLayout>