package com.bjzy.qctt.view;

import java.util.List;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bjzy.qctt.base.BaseItemView;
import com.riven.utils.volley.ScreenUtils;
import com.taoche.qctt.R;

public class InfomationViewGroup_OnePic extends BaseItemView{
	Context context;
	private ImageView iv_labe;
	private TextView infomation_title;
	private ImageView iv_image;
	private TextView infomation_content;
	private TextView infomation_item_author;
	private TextView infomation_item_time;
	private TextView infomation_item_reader;
	private TextView infomation_item_origin;
	public InfomationViewGroup_OnePic(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		this.context = context;
		initView(context);
	}

	public InfomationViewGroup_OnePic(Context context, AttributeSet attrs) {
		super(context, attrs);
		this.context = context;
		initView(context);
	}

	public InfomationViewGroup_OnePic(Context context) {
		super(context);
		this.context = context;
		initView(context);
	}
	protected void initView(Context context) {
		View contentView = View.inflate(context, R.layout.item_infomation_onepic, this);
		iv_labe = (ImageView) contentView.findViewById(R.id.iv_labe);
		infomation_title = (TextView) contentView.findViewById(R.id.infomation_title);
		infomation_content = (TextView) contentView.findViewById(R.id.infomation_content);
		infomation_item_author = (TextView) contentView.findViewById(R.id.infomation_item_author);
		infomation_item_time = (TextView) contentView.findViewById(R.id.infomation_item_time);
		infomation_item_reader = (TextView) contentView.findViewById(R.id.infomation_item_reader);
		infomation_item_origin = (TextView) contentView.findViewById(R.id.infomation_item_origin);
		iv_image = (ImageView) contentView.findViewById(R.id.iv_image);
	}

	@Override
	public void setiv_labe(int type) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setiv_image(List<String> imgs) {
		
	 android.view.ViewGroup.LayoutParams layoutParams = iv_image.getLayoutParams();
		layoutParams.height = ScreenUtils.getWindowswidth()/2;
		iv_image.setLayoutParams(layoutParams);
		iv_image.setImageResource(R.drawable.showcar);
		
	}

	@Override
	public void setinfomation_title(String title) {
		// TODO Auto-generated method stub
		infomation_title.setText(title);
	}

	@Override
	public void setinfomation_content(String content) {
		infomation_content.setText(content);
		
	}

	@Override
	public void infomation_item_origin(String origin) {
		infomation_item_origin.setText(origin);
		
	}

	@Override
	public void infomation_item_author(String author) {
		infomation_item_author.setText(author);
	}

	@Override
	public void setinfomation_item_time(String time) {
		infomation_item_time.setText(time);
		
	}

	@Override
	protected void setinfomation_item_reader(String num) {
		infomation_item_reader.setText(num);
		
	}
}

    
  