-3
I했습니다 다양한 요소와 나는 장치가 가로 모드에있을 때 (YouTube와 같은) 전체 화면으로 확장하는 유일한 VideoView를 지켜 보면서 요소 싶은 다음과 같은 XML :VideoView를 지켜 보면서
<RelativeLayout 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"
android:background="#FFFFFF"
tools:context=".VideoMapPanel" >
<com.sothree.slidinguppanel.SlidingUpPanelLayout
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:panelHeight="68dp"
sothree:shadowHeight="4dp"
sothree:paralaxOffset="100dp"
sothree:dragView="@+id/dragView"
>
<!-- MAIN CONTENT -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
xmlns:sothree="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_toolbar"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
sothree:theme="@style/ActionBar"
android:layout_width="match_parent"/>
<TextView
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:gravity="center"
android:text="Main Content"
android:clickable="true"
android:focusable="false"
android:focusableInTouchMode="true"
android:textSize="16sp" />
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment" />
</FrameLayout>
<!-- SLIDING LAYOUT -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#eeeeee"
android:orientation="vertical"
android:clickable="true"
android:focusable="false"
android:id="@+id/dragView">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:id="@+id/main_title_bar"
android:orientation="horizontal">
<TextView
android:id="@+id/tvName"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="@android:color/white"
android:textStyle="bold"
android:background="#FF8800"
android:gravity="center_vertical"
android:paddingLeft="10dp"/>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="50dip"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:background="#FF8800"
android:visibility="gone" >
</ProgressBar>
<ImageView
android:id="@+id/tvLogo"
android:layout_width="50dip"
android:background="#FF8800"
android:layout_height="match_parent"
android:paddingRight="10dp"
android:gravity="center_vertical" />
</LinearLayout>
<VideoView
android:id="@+id/liveView"
android:clickable="true"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"/>
<ImageButton
android:id="@+id/videoPlayButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:layout_gravity="center"
android:layout_margin="10dp"
android:src="@drawable/videoplaybutton" >
</ImageButton>
<LinearLayout
android:id="@+id/menuLayout"
android:background="#FFFFFF"
android:layout_width="match_parent"
android:layout_height="68dp"
android:orientation="horizontal">
<ImageButton
android:id="@+id/fbLogo"
android:background="#FFFFFF"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="0.8"
android:src="@drawable/facebook_logo"
/>
<ImageButton
android:id="@+id/twitterLogo"
android:background="#FFFFFF"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="0.8"
android:src="@drawable/twitter_logo"
/>
<ImageButton
android:id="@+id/webLogo"
android:background="#FFFFFF"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="0.8"
android:src="@drawable/web_logo"/>
</LinearLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<com.myapp.tv.ExpandableTextView
android:id="@+id/tvDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@android:color/black"
android:gravity="center_vertical"
android:paddingTop="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"/>
</ScrollView>
</LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</RelativeLayout>
을
프로그래밍 방식으로이 문제를 해결해야합니까?
이미이 솔루션을 사용해 보았지만 xml에서 발견 한 것처럼지도 조각이 있습니다. 그래서 새로운 동일한 레이아웃을로드 (심지어 가시성 : 요소에 대한 사라) 응용 프로그램이 충돌하게 : 원인 : java.lang.IllegalArgumentException : 이진 XML 파일 라인 # 51 : ID가 중복 0x7f0e0099, 태그 null 또는 부모 ID 0xffffffff 다른 com.google.android.gms.maps.MapFragment의 조각 – andreasperelli
조각 안에이 레이아웃을로드하고 있습니까? 당신이 그때이면, 나의 나쁜, 그렇습니다 당신은 프로그램으로 이것을 해결해야한다. 이 경우 문제는 조각 안에 조각이 있다는 것입니다. http://developer.android.com/about/versions/android-4.2.html#NestedFragments 참고 : 레이아웃에이 포함되어 있으면 조각을 펼칠 수 없습니다. 중첩 된 조각은 조각에 동적으로 추가 될 때만 지원됩니다. 동적으로 추가하는 프레임 레이 아웃을 원할 것입니다. –
mlaHackingIsMagic