我的抽屉列表适配器在android中抛出类强制转换异常

时间:2015-01-29 20:55:50

标签: android listview android-fragments android-listview navigation-drawer

嗨伙计们。我的导航抽屉列表有问题。当我想更新抽屉列表中的一个项目时出现问题。当用户单击其中一个复选框时,我想更新抽屉列表中的一个项目。如果用户没有点击其中一个复选框,抽屉列表工作正常,但当他点击它们,并且用户在屏幕上滑动以显示抽屉列表时,当他点击其中一个项目时,应用程序崩溃。你能帮我找到一个很好的解决方案来更新我的抽屉列表中的一个项目。只需要在imageview中更改图像。我试着解决这一整天,但我无法找到解决方案,你能帮助我吗?我感谢您的帮助。谢谢。 这是我的主要活动

public class PitanjeActivity extends NavDrawerActivity implements OnClickListener {

private Animator mCurrentAnimator;
private int mShortAnimationDuration;

private ArrayList<Pitanja> getAllPitanja;
private ArrayList<Pitanje_has_Slika> getAllImages;
private ArrayList<Odgovor> odgovorList;
private HashMap<Integer, List<Integer>> odgBrojPitanja;
private List<Integer> kliknuti;
private DBTools db = new DBTools(this);
private Intent intent;
int broj = 0;
private ImageView previous, informacije, odgovori, next, textSlike;
private TextView brojPitanja, kategorijaPitanja, textPitanja;
private String info;
private ListView listView;
boolean odgovoreno, tocno;
private RelativeLayout rightRL;
private DrawerLayout drawerLayout;
private ArrayList<NavDrawerItem> m;
PitanjaAdapter adapter;



@SuppressLint("UseSparseArrays")
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    previous = (ImageView) findViewById(R.id.previousButton);

    informacije = (ImageView) findViewById(R.id.informacijeButton);
    odgovori = (ImageView) findViewById(R.id.odgovoriButton);
    next = (ImageView) findViewById(R.id.nextButton);
    textSlike = (ImageView) findViewById(R.id.imageSlikaImageView);
    brojPitanja = (TextView) findViewById(R.id.brojPitanjaTextViewPitanjeActivity);
    kategorijaPitanja = (TextView) findViewById(R.id.kategorijaTextViewPitanjeActivity);
    kategorijaPitanja.setText(intent.getStringExtra("NAZIV_KATEGORIJE"));
    textPitanja = (TextView) findViewById(R.id.textPitanjaTextViewPitanjaActivity);
    previous.setOnClickListener(this);
    informacije.setOnClickListener(this);
    odgovori.setOnClickListener(this);
    next.setOnClickListener(this);

    getAllImages = db.getAllPitanjaImages();
    odgBrojPitanja = new HashMap<Integer, List<Integer>>();

    updateDisplay(broj);

}

@Override
protected void onNavItemSelected(int id) {

    if ( id > 200){
        Toast.makeText(getApplicationContext(), "kliknuo si na pitanje" + id + " toliki je id", Toast.LENGTH_SHORT).show();
        updateDisplay(id-200-1);

    } else {
        Toast.makeText(getApplicationContext(), "kliknuo si na izbornik" + id, Toast.LENGTH_SHORT).show();
    }

}

@Override
protected NavDrawerActivityConfiguration getNavDrawerConfiguration() {

    intent = getIntent();
    getAllPitanja = db
            .getAllPitanja(intent.getStringExtra("id_kategorije"));

    m = new ArrayList<NavDrawerItem>();
    m.add(NavigationItem.create(100, "Profil", R.drawable.ikona_profil_bez_okvira_01_01, this));
    m.add(NavigationItem.create(200, "Teme", R.drawable.ikona_kategorije_bez_okvira_01_01,this));
    m.add(NavigationItem.create(300, "Ispiti", R.drawable.ikona_ispit_bez_okvira_01, this));
    m.add(NavigationItem.create(400, "Znakovi", R.drawable.ikona_znakovi_bez_okvira_01, this));
    m.add(new NavigationSection(200, "PITANJA"));
    for (int i=0;i<getAllPitanja.size();i++){
        m.add(NavigationPitanja.create((200+i+1), "Pitanje " + (i+1), getAllPitanja.get(i).getTextPitanja(), this));
    }


    NavDrawerActivityConfiguration navDrawerActivityCOnfiguration = new NavDrawerActivityConfiguration();
    navDrawerActivityCOnfiguration.setLayout(R.layout.activity_pitanje);
    navDrawerActivityCOnfiguration.setDrawerLayoutId(R.id.drawer_layout_pitanja);
    navDrawerActivityCOnfiguration.setLeftDrawer(R.id.listaDesnoPitanja);
    navDrawerActivityCOnfiguration.setNavigationItem(m);
    navDrawerActivityCOnfiguration.setBaseAdapter(new NavigationListAdapter(this, R.layout.drawer_list_item, m));
    return navDrawerActivityCOnfiguration;

}

@SuppressLint("SdCardPath")
public void updateDisplay(int z) {

    odgovoreno = false;
    tocno = true;
    brojPitanja.setText(String.valueOf(z + 1) + "/"
            + String.valueOf(getAllPitanja.size()));
    textPitanja.setText(stripHtml(String.valueOf(getAllPitanja.get(z).getTextPitanja())));
    textSlike.setImageBitmap(null);
    info = getAllPitanja.get(z).getInfo();

    Log.d("Postoji", getAllImages.get(z).getNazivSlike() + ", ");

    for (int j = 0; j < getAllImages.size(); j++) {
        if (getAllImages.get(j).getIdPitanja() == getAllPitanja.get(z)
                .getIdPitanja()
                && getAllImages.get(j).getNazivSlike() != null) {
            Log.i("Id pitanja slike + idpitanja pitanja + idSlike",
                    getAllImages.get(j).getIdPitanja()
                            + ", "
                            + String.valueOf(getAllPitanja.get(z)
                                    .getIdPitanja()
                                    + ", "
                                    + getAllImages.get(j).getIdSlika()));
            textSlike.setVisibility(View.VISIBLE);
            String uri = PregledZnakova.PHOTOS_BASE_URL
                    + getAllImages.get(j).getNazivSlike();
            int rounded_value = 40;    

            DisplayImageOptions options = new DisplayImageOptions.Builder().cacheInMemory().cacheOnDisc().displayer(new RoundedBitmapDisplayer(rounded_value)).build();
            ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()).defaultDisplayImageOptions(options).build();               
            ImageLoader.getInstance().init(config); 
            ImageLoader.getInstance().displayImage(uri, textSlike,options);


            textSlike.setOnClickListener(new View.OnClickListener() {

                @Override
                public void onClick(View v) {
                    zoomImage(textSlike, textSlike);

                }
            });
            break;
            // }

        } else {
            textSlike.setVisibility(View.GONE);

        }
    }

    odgovorList = db.getAllOdgovore(Integer.toString(getAllPitanja.get(z)
            .getIdPitanja()));
    adapter = new PitanjaAdapter(this,
            R.layout.pitanja_entry, odgovorList);
    listView = (ListView) findViewById(R.id.listView);
    listView.setAdapter(adapter);
    if (checkList(z) == true){
        checList(z);
    }
    for (int i=0;i<getAllPitanja.size();i++){
        if (getAllPitanja.get(i).isTocno()){
            Log.i("Ovo pitanje je tocno", getAllPitanja.get(i).getTextPitanja());
        }
    }

}

@Override
public void onClick(View view) {
    switch (view.getId()) {

    case R.id.previousButton:
        odgovoreno = check();
        if (odgovoreno) {
            updateOdgovor(broj);
            set();
        } else {
            broj--;
            if (broj < 0) {
                broj = getAllPitanja.size() - 1;
            }
            updateDisplay(broj);
        }
        break;

    case R.id.informacijeButton:
        Intent intent = new Intent(getApplicationContext(),
                InformacijeActivity.class);
        intent.putExtra("Informacije", info);
        intent.putExtra("naslov",
                String.valueOf(getAllPitanja.get(broj).getTextPitanja()));
        startActivity(intent);
        break;

    case R.id.odgovoriButton:
        updateOdgovor(broj);
        postaviPitanje(broj);
        set();
        break;

    case R.id.nextButton:
        odgovoreno = check();
        if (odgovoreno) {
            updateOdgovor(broj);
            set();
        } else {
            broj++;
            if (broj > (getAllPitanja.size() - 1)) {
                broj = 0;
            }
            updateDisplay(broj);
        }

        break;

    }
}

public String stripHtml(String html) {
    return Html.fromHtml(html).toString();
}

private boolean check() {
    for (int i = 0; i < odgovorList.size(); i++) {
        Odgovor o = odgovorList.get(i);
        if (o.isSelected())
            return true;
    }
    return false;
}

private void checList(int a) {

    for (int i = 0; i < odgovorList.size(); i++) {
        Log.i("Velicina odgovorList je  ", String.valueOf((odgovorList.size())));
        Odgovor odgovor = odgovorList.get(i);

        for (List<Integer> tocan_odgovor : odgBrojPitanja.values()) {

            if (tocan_odgovor.contains(odgovor.getId())) {
                odgovor.setSelected(true);
            }
        }
        adapter.colorized(odgovor);
    }

}

private boolean checkList(int a){

    List<Integer> value = odgBrojPitanja.get(a);
    if (value != null){
        return true;
    } else {
        return false;
    }

}

private void set() {

    for (int i = 0; i < odgovorList.size(); i++) {
        Odgovor o = odgovorList.get(i);
        o.setSelected(false);
    }

}

private void postaviPitanje(int z) {

    for (int i = 0; i < odgovorList.size(); i++) {
        Odgovor odgovor = odgovorList.get(i);
        if (Integer.parseInt(odgovor.getIs_correct()) == 0
                && odgovor.isSelected()
                || Integer.parseInt(odgovor.getIs_correct()) == 1
                && !odgovor.isSelected()) {
            tocno = false;
        }

    }
    if (tocno){
        getAllPitanja.get(z).setTocno(true);
        Toast.makeText(getApplicationContext(), "Tocno ste odgovorili na pitanje cij je id " + getAllPitanja.get(z).getIdPitanja() + 200, Toast.LENGTH_SHORT).show();
        Log.i("Sljedeci mjenjeam", String.valueOf(200+getAllPitanja.get(z).getIdPitanja()));
        m.set(z, NavigationPitanja.update(200+getAllPitanja.get(z).getIdPitanja(), R.drawable.correct, this));
    }
    else {
        getAllPitanja.get(z).setNetocno(true);
        Toast.makeText(getApplicationContext(), "Niste tocno odgovorili", Toast.LENGTH_SHORT).show();
    }

}

这是我的抽象类NavDrawerActivity

public abstract class NavDrawerActivity extends FragmentActivity{


private DrawerLayout mDrawerLayout;
private ListView mDrawerList;
protected abstract void onNavItemSelected (int id);
private NavDrawerActivityConfiguration navConf;
protected abstract NavDrawerActivityConfiguration getNavDrawerConfiguration();

@Override
protected void onCreate(Bundle arg0) {
    super.onCreate(arg0);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);

    navConf = getNavDrawerConfiguration();
    setContentView(navConf.getLayout());
    mDrawerLayout = (DrawerLayout) findViewById(navConf.getDrawerLayoutId());
    mDrawerList = (ListView) findViewById(navConf.getLeftDrawer());
    mDrawerList.setAdapter(navConf.getBaseAdapter());
    mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
}

protected DrawerLayout getDrawerLayout() {
    return mDrawerLayout;
}
public void selectItem (int position) {
    ArrayList<NavDrawerItem> selectedItem = navConf.getNavigationItem();
    //NavDrawerItem selectedItem = navConf.getNavItems()[position];
    this.onNavItemSelected(selectedItem.get(position).getId());
    //this.onNavItemSelected(selectedItem.getId());
    mDrawerList.setItemChecked(position, true);

    if (this.mDrawerLayout.isDrawerOpen(this.mDrawerList)){
        mDrawerLayout.closeDrawer(mDrawerList);
    }

}

private class DrawerItemClickListener implements ListView.OnItemClickListener{

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position,
            long id) {
        selectItem(position);

    }

}   
}

以防万一你需要的是我的NavigationPitanjaclass,我想改变我的imageview图像的类

public class NavigationPitanja implements NavDrawerItem{


public static final int PITANJA_TYPE = 2;
private int id;
private String naslov, text;
private int icon;

private NavigationPitanja(){

}

public static NavigationPitanja create(int id, String naslov, String text, Context context){

    NavigationPitanja pitanja = new NavigationPitanja();
    pitanja.setId(id);
    pitanja.setNaslov(naslov);
    pitanja.setText(text);
    return pitanja;

}

public static NavigationPitanja update(int id, int icon, Context context){
    NavigationPitanja pitanja = new NavigationPitanja();
    pitanja.setId(id);
    pitanja.setIcon(icon);
    return pitanja;
}

public String getNaslov() {
    return naslov;
}

public void setNaslov(String naslov) {
    this.naslov = naslov;
}

public String getText() {
    return text;
}

public void setText(String text) {
    this.text = text;
}

public void setId(int id) {
    this.id = id;
}

@Override
public int getId() {
    // TODO Auto-generated method stub
    return id;
}

@Override
public String getLabel() {
    // TODO Auto-generated method stub
    return null;
}

@Override
public int getType() {
    // TODO Auto-generated method stub
    return PITANJA_TYPE;
}

@Override
public boolean isEnabled() {
    // TODO Auto-generated method stub
    return true;
}

public int getIcon() {
    return icon;
}

public void setIcon(int icon) {
    this.icon = icon;
}

}

这是我的适配器,我的日志猫说错误发生了

public class NavigationListAdapter extends ArrayAdapter<NavDrawerItem>{

private LayoutInflater inflater;

public NavigationListAdapter(Context context, int textViewResourceId,
        ArrayList<NavDrawerItem> objects) {
    super(context, textViewResourceId, objects);
    this.inflater = LayoutInflater.from(context);
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    View view = null;
    NavDrawerItem menuItem = this.getItem(position);
    if (menuItem.getType() == NavigationItem.ITEM_TYPE) {
        view = getItemView(convertView, parent, menuItem);
    } 
    else if (menuItem.getType() == NavigationPitanja.PITANJA_TYPE){
        view = getPitanjaView(convertView, parent, menuItem);
    }
    else {
        view = getSectionView(convertView, parent, menuItem);
    }
    return view;
}

public View getItemView(View convertView, ViewGroup parentView,
        NavDrawerItem navDrawerItem) {

    NavigationItem menuItem = (NavigationItem) navDrawerItem;
    NavMenuItemHolder navMenuItemHolder = null;

    if (convertView == null) {
        convertView = inflater.inflate(R.layout.drawer_list_item, parentView,
                false);
        TextView labelView = (TextView) convertView
                .findViewById(R.id.navmenuitem_label);
        ImageView i = (ImageView) convertView
                .findViewById(R.id.navmenuitem_icon);

        navMenuItemHolder = new NavMenuItemHolder();
        navMenuItemHolder.labelView = labelView;
        navMenuItemHolder.image = i;

        convertView.setTag(navMenuItemHolder);
    }

    if (navMenuItemHolder == null) {
        navMenuItemHolder = (NavMenuItemHolder) convertView.getTag();
    }

    navMenuItemHolder.labelView.setText(menuItem.getLabel().toString());
    navMenuItemHolder.image.setImageResource(menuItem.getIcon());

    return convertView;
}

public View getSectionView(View convertView, ViewGroup parentView,
        NavDrawerItem navDrawerItem) {

    NavigationSection menuSection = (NavigationSection) navDrawerItem;
    NavMenuSectionHolder navMenuItemHolder = null;

    if (convertView == null) {
        convertView = inflater.inflate(R.layout.darwer_list_section,
                parentView, false);
        TextView labelView = (TextView) convertView
                .findViewById(R.id.navmenusection_label);

        navMenuItemHolder = new NavMenuSectionHolder();
        navMenuItemHolder.labelView = labelView;
        convertView.setTag(navMenuItemHolder);
    }

    if (navMenuItemHolder == null) {
        navMenuItemHolder = (NavMenuSectionHolder) convertView.getTag();
    }

    navMenuItemHolder.labelView.setText(menuSection.getLabel().toString());

    return convertView;
}

public View getPitanjaView(View convertView, ViewGroup parentView, NavDrawerItem navDrawerItem){

    NavigationPitanja pitanjaSection = (NavigationPitanja) navDrawerItem;
    NavMenuPitanjaHolder navMenuPitanjaHolder = null;
    if (convertView == null){
        convertView = inflater.inflate(R.layout.drawer_list_pitanja, parentView, false);
        TextView naslovView = (TextView) convertView.findViewById(R.id.naslovPitanja);
        TextView textView = (TextView) convertView.findViewById(R.id.textPitanja);
        ImageView i = (ImageView) convertView.findViewById(R.id.tocno_netocno_imageView);

        navMenuPitanjaHolder = new NavMenuPitanjaHolder();
        navMenuPitanjaHolder.naslovPitanja = naslovView;
        navMenuPitanjaHolder.textPitanja = textView;
        navMenuPitanjaHolder.image = i;
        convertView.setTag(navMenuPitanjaHolder);

    }

    if (navMenuPitanjaHolder == null) {
        navMenuPitanjaHolder = (NavMenuPitanjaHolder) convertView.getTag();
    }

    navMenuPitanjaHolder.naslovPitanja.setText(pitanjaSection.getNaslov().toString());
    navMenuPitanjaHolder.textPitanja.setText(pitanjaSection.getText().toString());
    if (pitanjaSection.getIcon() == 0)
        navMenuPitanjaHolder.image.setImageResource(pitanjaSection.getIcon());

    return convertView;

}

@Override
public int getViewTypeCount() {
    return 3;
}

@Override
public int getItemViewType(int position) {
    return this.getItem(position).getType();
}

@Override
public boolean isEnabled(int position) {
    return getItem(position).isEnabled();
}


private static class NavMenuItemHolder {
    private TextView labelView;
    private ImageView image;
}

private static class NavMenuSectionHolder {
    private TextView labelView;
}

private static class NavMenuPitanjaHolder {
    private TextView naslovPitanja, textPitanja;
    private ImageView image;
}


}

这是我的logcat

  

01-29 21:50:07.815:E / AndroidRuntime(13414):致命异常:主要   01-29 21:50:07.815:E / AndroidRuntime(13414):java.lang.ClassCastException:com.prolink.autoskola.adapter.NavigationListAdapter $ NavMenuItemHolder无法强制转换为com.prolink.autoskola.adapter.NavigationListAdapter $ NavMenuPitanjaHolder   01-29 21:50:07.815:E / AndroidRuntime(13414):at com.prolink.autoskola.adapter.NavigationListAdapter.getPitanjaView(NavigationListAdapter.java:121)   01-29 21:50:07.815:E / AndroidRuntime(13414):at com.prolink.autoskola.adapter.NavigationListAdapter.getView(NavigationListAdapter.java:37)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.widget.AbsListView.obtainView(AbsListView.java:2449)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.widget.ListView.makeAndAddView(ListView.java:1775)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.widget.ListView.fillDown(ListView.java:678)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.widget.ListView.fillGap(ListView.java:642)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.widget.AbsListView.trackMotionScroll(AbsListView.java:5535)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3417)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.widget.AbsListView.onTouchEvent(AbsListView.java:3911)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.View.dispatchTouchEvent(View.java:7350)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2412)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2147)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)   01-29 21:50:07.815:E / AndroidRuntime(13414):at com.android.internal.policy.impl.PhoneWindow $ DecorView.superDispatchTouchEvent(PhoneWindow.java:2139)   01-29 21:50:07.815:E / AndroidRuntime(13414):at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1476)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.app.Activity.dispatchTouchEvent(Activity.java:2487)   01-29 21:50:07.815:E / AndroidRuntime(13414):at com.android.internal.policy.impl.PhoneWindow $ DecorView.dispatchTouchEvent(PhoneWindow.java:2087)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.View.dispatchPointerEvent(View.java:7535)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3415)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3347)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4456)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4434)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewRootImpl $ WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4538)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:163)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:4506)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.ViewRootImpl $ ConsumeBatchedInputRunnable.run(ViewRootImpl.java:4557)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.Choreographer $ CallbackRecord.run(Choreographer.java:725)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.Choreographer.doCallbacks(Choreographer.java:555)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.Choreographer.doFrame(Choreographer.java:523)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.view.Choreographer $ FrameDisplayEventReceiver.run(Choreographer.java:711)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.os.Handler.handleCallback(Handler.java:615)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.os.Handler.dispatchMessage(Handler.java:92)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.os.Looper.loop(Looper.java:137)   01-29 21:50:07.815:E / AndroidRuntime(13414):在android.app.ActivityThread.main(ActivityThread.java:4921)   01-29 21:50:07.815:E / AndroidRuntime(13414):at java.lang.reflect.Method.invokeNative(Native Method)   01-29 21:50:07.815:E / AndroidRuntime(13414):at java.lang.reflect.Method.invoke(Method.java:511)   01-29 21:50:07.815:E / AndroidRuntime(13414):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1027)   01-29 21:50:07.815:E / AndroidRuntime(13414):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)   01-29 21:50:07.815:E / AndroidRuntime(13414):at dalvik.system.NativeStart.main(Native Method)

欢迎任何帮助,我很感激。

1 个答案:

答案 0 :(得分:0)

你想如何施展它?

 private static class NavMenuItemHolder {
    private TextView labelView;
    private ImageView image;
}

private static class NavMenuPitanjaHolder {
    private TextView naslovPitanja, textPitanja;
    private ImageView image;
}

考虑到这一点:每辆车都是卡车???

enter image description here