1
보기의 배경으로 다른 레이아웃을 설정할 수 있습니까?Android :보기 레이아웃을 배경으로 설정
내가보기에는 격자보기 뒤에서 카운트 다운을 수행하는 텍스트보기가 있습니다.
그리드보기의 배경 리소스로 레이아웃을 설정해 보았지만 드로어 블만 예상합니다.
가장 좋은 해결 방법은 무엇입니까? 투명 배경으로 그리드 뷰 뒤에서이 레이아웃을 어떻게 쌓아 올리면 좋을까요?
보기의 배경으로 다른 레이아웃을 설정할 수 있습니까?Android :보기 레이아웃을 배경으로 설정
내가보기에는 격자보기 뒤에서 카운트 다운을 수행하는 텍스트보기가 있습니다.
그리드보기의 배경 리소스로 레이아웃을 설정해 보았지만 드로어 블만 예상합니다.
가장 좋은 해결 방법은 무엇입니까? 투명 배경으로 그리드 뷰 뒤에서이 레이아웃을 어떻게 쌓아 올리면 좋을까요?
FrameLayout을 사용하면 다른 것들 위에 스택 할 수 있습니다.
다음은 HelloGridView 코드와 내 자신의 텍스트 뷰 레이아웃 (카운터를 에뮬레이트하려고 시도 함)을 결합한 예입니다. 그 결과 GridView는 카운터 TextViews가 위에 떠있는 개 그림을 표시합니다.
희망이 도움이됩니다.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/frameLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<GridView
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="90dp"
android:gravity="center"
android:horizontalSpacing="10dp"
android:numColumns="auto_fit"
android:stretchMode="columnWidth"
android:verticalSpacing="10dp" />
<LinearLayout
android:id="@+id/counterLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/counterLabel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:text="Counter" />
<TextView
android:id="@+id/counterValue"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:text="128"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
</FrameLayout>
완벽하게 작동합니다. 감사합니다. – DJ180