2016-10-26 3 views
0

Please check this imageРазмер изображения не увеличивается, как размер изображения изображения увеличивается в XML

Перед чтением вопроса, проверьте изображение. Здесь я хочу увеличить размер самого левого круга, но он фиксируется при этом размере независимо от размера изображения. Может кто-нибудь помочь.

Вот код: -

<LinearLayout 
    android:id="@+id/prescription_folder" 
    android:layout_weight="1" 
    android:orientation="horizontal" 
    android:layout_width="match_parent" 
    android:layout_height="0dp"> 

    <!-- first segment--> 
    <RelativeLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content"> 

     <ImageView 
      android:id="@+id/folder_image_first" 
      android:src="@drawable/ic_action_circle" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" /> 

     <ImageView 
      android:layout_centerInParent="true" 
      android:id="@+id/folder" 
      android:src="@drawable/ic_action_folder" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" /> 



     <!-- <ImageView 
      android:id="@+id/folder_image_first" 
      android:src="@drawable/images_with_folder" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" />--> 

     <TextView 
      android:textColor="@color/green" 
      android:textStyle="bold" 
      android:id="@+id/no_of_files_first" 
      android:text="10" 
      android:layout_centerInParent="true" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" /> 
    </RelativeLayout> 


    <!--Middle Text i.e folder name and date--> 
    <LinearLayout 
     android:layout_marginLeft="18dp" 
     android:layout_weight="1" 
     android:orientation="vertical" 
     android:layout_width="0dp" 
     android:layout_height="match_parent"> 

     <!--android:text="Rx/Prescription"--> 

     <TextView 
      android:textColor="@color/white" 
      android:textStyle="bold" 
      android:textAppearance="@style/TextAppearance.AppCompat.Medium" 
      android:layout_marginBottom="5dp" 
      android:text="ABC" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      /> 

     <TextView 
      android:textColor="#03C9A9" 
      android:id="@+id/last_updated_date_first" 
      android:text="date" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" /> 

    </LinearLayout> 

    <!--Last Segement--> 
    <LinearLayout 
     android:gravity="top|right" 
     android:orientation="horizontal" 
     android:layout_weight="0.3" 
     android:layout_width="wrap_content" 
     android:layout_height="match_parent"> 

     <ImageButton 
      android:id="@+id/alert_button_pres" 
      android:background="@null" 
      android:src="@drawable/ic_action_info" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" /> 

    </LinearLayout> 


</LinearLayout> 
+0

что делать и имеет в виде, говоря, что имеет фиксированный размер? что вы пытались увеличить его размер? –

+0

Я загрузил изображение с более высоким пикселем. –

+0

u не ответил на мой вопрос. что ты сделал? –

ответ

0

это потому, что круг естественный размер, это самый маленький, чем изображение внутри, и Android не работает с процентами,

  1. решение задает размер круга и размер изображения.

  2. Других решений являются начертить окружность с координатами, и поставить линейную компоновку внутри, и поставить размер изображения с содержанием наполнителя

Смежные вопросы