2015-01-13 2 views
0

3 가지 이미지 (PNG)가있는 XML 레이아웃이 있습니다. Ecpilse에서 나는 모두를 볼 수 있습니다. 매니 페스트에서 나는 android:theme="@style/Theme.Dialog.NoTitleBar"으로 활동을 기각하지만, 나는 그것을 실행했을 때, 세 이미지가 투명도를 잃었고, 배경은 흰색이다. ...DialogActivity에서 이미지의 투명도가 손실됩니다.

나는 모른다. 나는 코드를 통해 아무 것도하지 않는다. 문제의 원인은 무엇입니까? 여기

는 XML :

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical"> 

    <RelativeLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:background="@color/azure" > 

     <ImageView 
      android:id="@+id/search_image_back_arrov" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentLeft="true" 
      android:layout_alignParentTop="true" 
      android:contentDescription="@string/app_name" 
      android:scaleType="centerInside" 
      android:src="@drawable/test" /> 

     <ImageView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignBottom="@+id/search_image_back_arrov" 
      android:layout_alignParentLeft="true" 
      android:layout_marginBottom="5dp" 
      android:layout_marginLeft="5dp" 
      android:contentDescription="@string/app_name" 
      android:src="@drawable/fc_europ_logo" /> 

    </RelativeLayout> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:background="@color/gray" 
     android:orientation="vertical" 
     android:padding="10dp" > 

     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="36dp" 
      android:background="@drawable/template_background" 
      android:orientation="vertical" > 

      <EditText 
       android:id="@+id/search_edittext_input" 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:layout_alignLeft="@+id/search_search_img_container" 
       android:layout_alignParentBottom="true" 
       android:layout_alignParentLeft="true" 
       android:ems="10" 
       android:hint="@string/search_movie" > 

       <requestFocus /> 
      </EditText> 

      <LinearLayout 
       android:id="@+id/search_search_img_container" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_alignParentRight="true" 
       android:layout_alignParentTop="true" 
       android:layout_marginRight="5dp" 
       android:orientation="vertical" > 

       <ImageView 
        android:id="@+id/imageView1" 
        android:layout_width="24dp" 
        android:layout_height="match_parent" 
        android:contentDescription="@string/search" 
        android:src="@drawable/lupe" /> 

      </LinearLayout> 

     </RelativeLayout> 
    </LinearLayout> 

</LinearLayout> 

대화는 활동 다음으로 생성됩니다

여기
public class SearchActivity extends Activity { 


    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 

     setContentView(R.layout.activity_search); 
    } 

} 

사진 :

enter image description hereenter image description here

+0

대화 상자를 어떻게 만듭니 까? – Hemanth

+0

나는 매니 페스트에서 그것을 낙담 했으므로 .... 활동으로. 코드를 추가했습니다. – Emaborsa

+0

정말입니까? RelativeLayout을 살펴보세요. – Emaborsa

답변

-1

다음 코드를 추가 시도 : dialog.requestWindowFeature (Windo w.FEATURE_NO_TITLE); 또는 instaead - 프로젝트를 청소하고 다시 실행하십시오. 깨끗한 프로젝트 : 프로젝트> 깨끗한.

관련 문제