本文整理汇总了Java中com.lidroid.xutils.ViewUtils类的典型用法代码示例。如果您正苦于以下问题:Java ViewUtils类的具体用法?Java ViewUtils怎么用?Java ViewUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewUtils类属于com.lidroid.xutils包,在下文中一共展示了ViewUtils类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder=null;
if(convertView==null){
convertView= LayoutInflater.from(context).inflate(R.layout.item_introduce_gridview,null);
viewHolder=new ViewHolder();
ViewUtils.inject(viewHolder,convertView);
convertView.setTag(viewHolder);
}else {
viewHolder = (ViewHolder) convertView.getTag();
viewHolder.imageViewIntroduce.setImageResource(R.mipmap.xiangguanfenxiang_morentu);
}
Introduce.Member_Share data=datas.get(position);
viewHolder.address.setText(data.getShop_name());
viewHolder.timeIntroduce.setText(data.getTime_tips());
viewHolder.dishNameIntroduce.setText(data.getDish_name());
viewHolder.num.setText(data.getAward_count());
bitmapUtils.display(viewHolder.imageViewIntroduce, data.getMain_photo_url());
return convertView;
}
示例2: getView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public View getView(int position, View convertView, ViewGroup parent) {
HolderType holder = null;
currentData = getItem(position);
if (convertView == null) {
// convertView = inflater.inflate(viewCallback.getViewId(), null);
convertView = inflater.inflate(layoutResId, null);
holder = viewCallback.getViewHolder(convertView, position);
ViewUtils.inject(holder, convertView);
convertView.setTag(holder);
} else {
holder = (HolderType) convertView.getTag();
}
viewCallback.initView(holder, position);
return convertView;
}
示例3: onCreate
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ViewUtils.inject(this);
BaseApplication.MyActivityManager.addActivity(this);
// if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
// Window window = getWindow();
// window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
// window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
// window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
// window.setStatusBarColor(Color.TRANSPARENT);
// window.setNavigationBarColor(Color.TRANSPARENT);
// }
}
示例4: onCreateView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
if (v != null) {
ViewUtils.inject(this, v);
return v;
}
v = inflater.inflate(R.layout.disco_fragment, container, false);
ViewUtils.inject(this, v);
addView();
MyAdapter myAdapter = new MyAdapter(getFragmentManager());
myAdapter.notifyDataSetChanged();
main_viewpager.setAdapter(myAdapter);
main_viewpager.setOffscreenPageLimit(2);
main_tab.setTabMode(TabLayout.MODE_FIXED);
main_tab.setupWithViewPager(main_viewpager);
return v;
}
示例5: onCreateView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater,
@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.bitmap_fragment_view, container,
false);
ViewUtils.inject(this, view);
adapter = new MyAdapter(getActivity());
listView.setAdapter(adapter);
bitmapUtils = new BitmapUtils(getActivity());
bitmapUtils.configDefaultLoadingImage(R.drawable.ic_launcher);
bitmapUtils.configDefaultLoadFailedImage(R.drawable.down);
bitmapUtils.configDefaultBitmapConfig(Bitmap.Config.RGB_565);
loadImgList("http://www.22mm.cc/");
return view;
}
示例6: onCreate
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setAbContentView(R.layout.activity_security_setting);
ViewUtils.inject(this);
//绑定点击事件:修改密码
s1_layout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(final View v) {
Intent intent = new Intent(SecuritySettingActivity.this, ChangePWDActivity.class);
startActivity(intent);
}
});
}
示例7: onCreate
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.sosuo_img);
ViewUtils.inject(this);
init();
Intent intent = getIntent();
switch (intent.getIntExtra("name", 0)) {
case ZIXUN:// 由资讯页面过来搜索
break;
case LAPIN:// 由辣品页面过来搜索
break;
case ITQUAN:// 由ItQuan页面过来搜索
sosuorb_ItQuan.setChecked(true);
break;
default:
break;
}
}
示例8: onCreate
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setAbContentView(R.layout.activity_contact_info);
ViewUtils.inject(this);
con_id = getIntent().getLongExtra("con_id", -1);
findViewById(R.id.contact_username).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(ContactInfoActivity.this, ContactTextEditActivity.class);
intent.putExtra("contact", contactInfo.getContact());
startActivity(intent);
}
});
}
示例9: getView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
holder = new ViewHolder();
convertView = LayoutInflater.from(context).inflate(
R.layout.lapin_show_addresslist_listview_item, null);
ViewUtils.inject(holder, convertView);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.name.setText(datas.get(position).getName());
holder.phone.setText(datas.get(position).getPhone());
if("1".endsWith(datas.get(position).getIsDefault())){
holder.isdefault.setVisibility(View.VISIBLE);
}else{
holder.isdefault.setVisibility(View.GONE);
}
holder.address.setText(datas.get(position).getAddress());
return convertView;
}
示例10: onCreate
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.itquan_kejichat_clickimgedit);
ViewUtils.inject(this);
// 子部局 listPhotoItem
// viewPhoto=LayoutInflater.from(ItQuan_KeJiChat_ClickImgEdit.this).inflate(R.layout.itquan_kejichangtan_clickedit_listitem_photo,
// null);
// contentSelectImg=(ImageView)
// viewPhoto.findViewById(R.id.contentSelectImg);
// listPhotodata=new ArrayList<HashMap<String,Object>>();//相片集合
bitmapUtils = new BitmapUtils(this);
// itquan_fabiaoData=new ArrayList<ItQuanBeen>();
// get();
init();
// 广播的接收 删除photo
// bCastRe=new broadCastRe();
// IntentFilter deleteFilter=new IntentFilter();
// deleteFilter.addAction("deleteItem");
// registerReceiver(bCastRe, deleteFilter);
}
示例11: onCreateView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.my_fragment_layout,container,false);
ViewUtils.inject(this,view);
return view;
}
示例12: onCreateView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.home_fragment_layout, null);
this.inflater = inflater;
ViewUtils.inject(this, view);
return view;
}
示例13: onCreateView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.carmara_fragment_layout,null);
ViewUtils.inject(this, view);
takeImage();
return view;
}
示例14: onCreate
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hddetail);
ViewUtils.inject(this);
ptrListView.setMode(PullToRefreshBase.Mode.DISABLED);
initBitmapUtils();
View headView = getHeadView();
ptrListView.getRefreshableView().addHeaderView(headView);
list = new ArrayList<>();
adapter = new HdPtrlistviewAdapter(list,getApplicationContext());
ptrListView.setAdapter(adapter);
loadData();
}
示例15: getHeadView
import com.lidroid.xutils.ViewUtils; //导入依赖的package包/类
public View getHeadView(){
View view = LayoutInflater.from(getApplicationContext()).inflate(R.layout.huodong_detail_headview_layout,null);
ViewUtils.inject(this,view);
if (huoDongBean!=null){
bitmapUtils.display(huodong_headview_img,huoDongBean.getData().getIndex_activity_item().getImage_url());
huodong_upimg_name.setText(huoDongBean.getData().getIndex_activity_item().getName());
huodong_people_time.setText(huoDongBean.getData().getIndex_activity_item().getActivity_time_tip()+" "+huoDongBean.getData().getIndex_activity_item().getMember_count()+"人分享");
huodong_huodong_detail_textview.setText(huoDongBean.getData().getIndex_activity_item().getDesc());
}
return view;
}