안드로이드 개발 질문/답변
(글 수 45,052)
뷰어를 만들고 있는데..
현재 이미지의 중앙을 클릭했다고 했을때..... 텍스트를 이미지 위에 살짝 보여주고 싶습니다....
그래서 FrameLayout을 아래처럼
--
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/page"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<ImageView
android:id="@+id/img_fix"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="matrix"
/>
</FrameLayout>
--
onToouch 함수에서
TextView text = ~~~~~~~~~~~~~~~~;
text.setVisibility(View.VISIBLE);
text.setText("클릭하였습니다");
------------------------------------------------------------------
이렇게 하면 될줄 알았는데....이미지 밑에 가려서 글씨가 보이지 않네요...ㅠ.ㅠ
이미지위에 텍스트를 띄우고 싶은데 어떡해야 하나요^^?
현재 이미지의 중앙을 클릭했다고 했을때..... 텍스트를 이미지 위에 살짝 보여주고 싶습니다....
그래서 FrameLayout을 아래처럼
--
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/page"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<ImageView
android:id="@+id/img_fix"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="matrix"
/>
</FrameLayout>
--
onToouch 함수에서
TextView text = ~~~~~~~~~~~~~~~~;
text.setVisibility(View.VISIBLE);
text.setText("클릭하였습니다");
------------------------------------------------------------------
이렇게 하면 될줄 알았는데....이미지 밑에 가려서 글씨가 보이지 않네요...ㅠ.ㅠ
이미지위에 텍스트를 띄우고 싶은데 어떡해야 하나요^^?
http://sites.google.com/site/endihom/home/programming-language/android/article/layout-tricks-merge