错误使类com.elyeproj.loaderviewlibrary.LoaderImageViewImageView膨胀
错误跟踪:
致命异常:主要过程:com.example.user.itekit,PID:23028 android.view.InflateException:二进制XML文件行#87:错误充气类com.elyeproj.loaderviewlibrary.LoaderImageViewImageView在android.view.LayoutInflater.createViewFromTag(LayoutInflater .java:764)at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)at android.view.LayoutInflater.rInflate(LayoutInflater.java:821)at android.view.LayoutInflater.inflate(LayoutInflater.java:511)在android.view.LayoutInflater.inflate(LayoutInflater.java:415)在android.view.LayoutInflater.inflate(LayoutInflater.java:366)在com.example.user.itekit.ListbaseAdapter.getView(ListbaseAdapter.java:74)在android.widget.AbsListView.obtainView(AbsListView.java:2842)at android.widget.ListView.measureHeightOfChildren(ListView.java:1290)at android.widget.ListView.onMeasure(ListView.java:1202)at com.example.user .itekit.ExpandableHightListView.onMeasure(ExpandableHightListView.java:36)at android.view.View.measure(View.java:1 8425)在android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5802)在android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1835)在android.widget.LinearLayout.measureVertical(LinearLayout.java:725)在机器人。 widget.LinearLayout.onMeasure(LinearLayout.java:616)在android.view.View.measure(View.java:18425)在android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5802)在android.widget.FrameLayout.onMeasure (FrameLayout.java:430)在android.widget.FrameLayout.onMeasure android.widget.ScrollView.measureChildWithMargins(ScrollView.java:2015)android.view.View.measure(View.java:18425)(FrameLayout.java: 430)在android.widget.ScrollView.onMeasure(ScrollView.java:484)在android.view.View.measure(View.java:18425)在android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:728)在机器人。 widget.RelativeLayout.onMeasure(RelativeLayout.java:464)at android.view.View.measure(View.java:18425)at android.view.ViewGroup.measureChildWithMarg 在android.view.measure中的android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)上的android.widget.FrameLayout.onMeasure(FrameLayout.java:430)中的视图(ViewGroup.java:5802) (View.java:18425)在android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5802)在android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1835)在android.widget.LinearLayout.measureVertical(LinearLayout.java: 725)在android.widget.LinearLayout.onMeasure(LinearLayout.java:616)在android.view.View.measure(View.java:18425)在android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5802)在机器人。 widget.FrameLayout.onMeasure(FrameLayout.java:430)在android.view.View.measure(View.java:18425)在android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5802)在android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1835)在android.widget.LinearLayout.measureVertical(LinearLayout.java:725)在android.widget.LinearLayout.onMeasure(LinearLa (android.view.java:18425)android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5802)android.widget.FrameLayout.onMeasure(FrameLayout.java:430) )在com.android.internal.policy.impl.PhoneWindow $ DecorView.onMeasure(PhoneWindow.java:2881)在android.view.View.measure(View.java:18425)在android.view.ViewRootImpl.performMeasure(ViewRootImpl。的java:2237)在android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1295)处android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1180 android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1537))在android.view.ViewRootImpl $ TraversalRunnable.run(ViewRootImpl.java:6558)at android.view.Choreographer $ CallbackRecord.run(Choreographer.java:777)at android.view.Choreographer.doCallbacks(Choreographer.java:590)at android .view.Choreographer.doFrame(Choreographer.java:560)在android.view.Choreographer $ FrameDisplayEventReceiver.run(Choreographer.java:763)在android.os.Handler.handleCallbac ķ
从https://android-arsenal.com/details/1/4243#!description使用Android的Loader View试过。
理想的情况是:将链接的加载效果显示在视图中的图像和文本上。
问题出现了,每当我尝试通过适配器实现它时,我会根据标题状态得到一个错误
代码片段如下所示:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder = null;
if (convertView == null) {
LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.list, null);
viewHolder = new ViewHolder();
viewHolder.image = (LoaderImageView)convertView.findViewById(R.id.image);
viewHolder.title = (LoaderTextView)convertView.findViewById(R.id.title);
viewHolder.subtitle = (LoaderTextView)convertView.findViewById(R.id.subtitle);
viewHolder.shop = (LoaderTextView)convertView.findViewById(R.id.shop);
convertView.setTag(viewHolder);
}else {
viewHolder = (ViewHolder)convertView.getTag();
}
BeanclassTourCategory bean = (BeanclassTourCategory)getItem(position);
Picasso.with(context)
.load(bean.getImage())
.fit()
.into(viewHolder.image);
viewHolder.title.setText(bean.getTitle());
viewHolder.subtitle.setText(bean.getSubtitle());
viewHolder.shop.setText(bean.getShop());
return convertView;
}
A)是否有解决此错误的可能方案?
B)是否有任何其他的Loader视图可以通过适配器轻松实现?
对不起,我第一次没有看到:
错误使类com.elyeproj.loaderviewlibrary.LoaderImageViewImageView膨胀
你在你的xml LoaderImageViewImageView而不是LoaderImageView中调用了一些东西
在xml中删除组件LoaderImageViewImageView的src
链接地址: http://www.djcxy.com/p/84731.html上一篇: Error inflating class com.elyeproj.loaderviewlibrary.LoaderImageViewImageView