2014-10-18 4 views
0

이것은 내 주요 활동 XML 파일입니다.주요 활동 내용에서 프레임 레이아웃 내용이 매우 흐립니다.

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" 
android:padding="5dp" 
android:background="#ffffff" > 

<TextView 
    android:id="@+id/txtPostMessage" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_marginBottom="3dp" 
    android:textColor="#000000"  
    /> 

<FrameLayout 
    android:id="@+id/postItems" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    >   
</FrameLayout> 

<TextView 
    android:id="@+id/txtPostCreatedTime" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:gravity="right" 
    android:textColor="@android:color/black" 
/>  

<ListView 
    android:id="@+id/lvCommentList" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    > 
</ListView> 

</LinearLayout> 

동적으로 FrameLayout이의 XML 레이아웃을 추가하고 모든 것이 VideoView를 지켜 보면서이 포함이 레이아웃을 제외하고 좋았어요.

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:orientation="vertical" > 

<VideoView 
    android:id="@+id/postVideo" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    />   
</LinearLayout> 

이러한 인레이를 통해 이러한 레이아웃을 추가하고 있습니다.

View v = inflater.inflate(R.layout.videoview_activity, null, false); 
PostVideo = (VideoView) v.findViewById(R.id.postVideo); 
Uri vidUri = Uri.parse(source); 
PostVideo.setVideoURI(vidUri); 
PostItems.addView(v); 

다른 레이아웃은 완벽하게 작동하지만이 레이아웃에서는 videoView가 매우 어둡거나 어두운 콘트라스트로 비디오를 재생합니다.

My activity is dialogue activity, so it opens on top of my previous activity, And sometimes it shows previous activity through framelayout, which may mean that framelayout or video layout is transparent

답변

0

내가 많은 도움이 될 것입니다 나를 위해 완벽하게 작동 this 답을 발견했다.