2014-01-28 28 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>