2014-11-10 3 views
0

Привет им один макет в comments_logs Allign права, Im используя Aquery Android My Xml МАКЕТОбрезать изображение андроида к Уголкам

<?xml version="1.0" encoding="utf-8"?> 

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_gravity="left" 
    android:background="@android:color/white" 
    android:layout_marginTop="15dp" 
    android:paddingRight="8dp"> 


    <ImageView 
     android:id="@+id/image_comments" 
     android:layout_width="120dp" 
     android:layout_height="120dp" 
     android:src="@drawable/ic_launcher" 
     android:padding="10dp" 
     android:layout_alignParentLeft="true" 
     android:cropToPadding="true" 
     android:scaleType="centerCrop" /> 


    <TextView 
     android:id="@+id/message" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@string/hello_world" 
     android:textAppearance="?android:attr/textAppearanceMedium" 
     android:textColor="@android:color/black" 
     android:layout_centerVertical="true" 
     android:layout_toRightOf="@+id/image_comments" 
     android:layout_toEndOf="@+id/image_comments" /> 


</RelativeLayout> 

И мой класс, IMAGE_URL мой переменная для изображения на адрес в моем сервере:

String image_url="example_for_image_url_string" 

int layout_id = R.layout.layout_comment_left; 

RelativeLayout relativeLayout = (RelativeLayout) inflater.inflate(layout_id, null, false); 
           AQuery aq = new AQuery(relativeLayout); 
           aq.id(R.id.image_comments).image(image_url); 




TextView message = (TextView) relativeLayout.findViewById(R.id.message); 
          message.setText(message_json); 
          layout.addView(relativeLayout); 

челобитных, Как установить или преобразовать мое изображение в круге, мне нужно croop угла или радиуса

с уважением!

+0

взглянуть на этот ответ http://stackoverflow.com/a/18378873/4224337 – Rami

+0

Нет для моего вопроса, спасибо но нет ответа на этот вопрос – Luis

ответ

0

Im решаемые эти вопросы по:

AQuery aq = new AQuery(relativeLayout); 
ImageOptions options = new ImageOptions(); 

options.round = 105; 

aq.id(R.id.image_comments).image(image_url,options); 
Смежные вопросы