안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요... 안드로이드를 열공하고 있는 횐입니다.
A라는 백그라운드 이미지가 있고, B라는 텍스트가 있습니다.
그림처럼 B 텍스트가 A 이미지 뒤에 있는 것처럼 겹치게 보이려면
어떻게 하면 표현을 할 수 있을까요?
A라는 백그라운드 이미지를 표현하는 layout을 선언하고,
B텍스트를 표현하는 텍스트뷰를 선언하고,
이 두개를 어떻게 짬뽕하면 되는지,
아니면 다른 효율적인 방식이 있는지 궁금합니다.
감사합니다.
2010.10.05 10:39:52
어이쿠 죄송합니다. 제가 글을 반대로 읽고 있었네요..ㅋㅋㅋ;;; (몇일 야근 중이다보니 글이 제대로 안보이네요...ㅎㅎ)
(먼저 작성했던 리플을 수정했습니다..^^;;)
이런 경우라면 textview의 Color에 알파값을 넣어 주셔도 표현이 가능하실 겁니다..^^;;;;;
물론 배경도 Textview에 그대로 넣어 두시구요...
아니면 View의 중첩을 이용한 방법을 이용하여 알파값 조정을 해주셔야겠지만......
결국 알파값을 이용한 처리 임으로 추가 View를 둘것인지 Textview 자체적으로 알파값을 조정할것인지는
일단 적용하여 룩을 보시고 판단하시는게 좋을 꺼 같습니다..^^a
2010.10.05 10:38:56
글 위에 덮을 ImageView 백그라운드 컬러 알파값을 조절하면 될꺼 같네요..
뭐..이런식으로??
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="TEST" />
<ImageView android:background="#77FF4400"
android:layout_width="fill_parent" android:layout_height="fill_parent" />
</RelativeLayout>
뭐..이런식으로??
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="TEST" />
<ImageView android:background="#77FF4400"
android:layout_width="fill_parent" android:layout_height="fill_parent" />
</RelativeLayout>




주황색 이미지를 알파값을 고려한 이미지로 만든 다음에 겹치면 되지 않을까요?