ViewFactory

package com.cmb.zh.session.find.views;


import android.content.Context;
import android.view.LayoutInflater;
import android.widget.ImageView;


import com.cmb.zh.common.util.ImgLoad;
import com.mb.zhaohusdk.R;
/**
 * ImageView創建工廠
 */
public class ViewFactory {


/**
* 獲取ImageView視圖的同時加載顯示url

* @param text
* @return
*/
public static ImageView getImageView(Context context, String url) {
ImageView imageView = (ImageView)LayoutInflater.from(context).inflate(
R.layout.view_banner, null);
// ImageLoader.getInstance().displayImage(url, imageView);
return imageView;
}

}




<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scaleType="fitXY"
     />
    


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章