안드로이드 반투명 액티비티

2014. 11. 20. 00:09Mobile/Android



반응형

드로이드 반투명 액티비티



레이아웃안에다가 이미지뷰를 2개를 넣고 실직적인 뷰안에서 ivDimmed 를 Visible로 바꿔주면 된다~ 





<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

>


   <ImageView

            android:id="@+id/ivBackgroud"

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:src="@drawable/ps_bg_dimmed"

            android:visibility="visible"

           />


   <ImageView

            android:id="@+id/ivDimmed"

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:src="@drawable/ps_bg_dimmed"

            android:visibility="gone"

            android:background="#10000000" />


</LinearLayout>



android:backgroud 에서 10000000 의미는 앞자리2개가 높을때 투명도가 진해진다~

더좋은 방법도 있지만 이방법도 괜찮은 방법인거 같다~~






끝~

반응형

'Mobile > Android' 카테고리의 다른 글

이클립스 svn: E155004  (1) 2014.12.02
안드로이드 gcm 등록  (0) 2014.11.25
안드로이드 동영상 재생  (0) 2014.11.18
svn 계정 변경  (0) 2014.11.17
이클립스 디버깅  (0) 2014.11.16