在ListView控件onItemClick侦听器未在TabHo

在ListView控件onItemClick侦听器未在TabHo

本文介绍了在ListView控件onItemClick侦听器未在TabHost工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

列表视图位于TabActivity内,我无法生成的listItem点击,尝试了很多的方法,但无法完成的任务,因此,任何人都可以提供帮助。谢谢你。

Listview is located inside the TabActivity and I am unable to generate the click on listItem, try a lot of way but unable to accomplish the task, so, anybody can help. thank you.

推荐答案

走新型视图,然后抬高它会解决列表视图中的onClick的TabHost问题...!

Taking a new View then inflate it will resolve the problem in listview onClick in TabHost...!

public View getView(final int position, View convertView1, ViewGroup parent)
{

    final ViewHolder holder;

    final Context context;

    View convertView = null;

    if (convertView == null)
    {
        convertView = mInflater.inflate(R.layout.file_display_binding, null);
        holder = new ViewHolder();
        System.out.println("inside efficient array");
        holder.file_imgview = (ImageView)convertView.findViewById(R.id.file_icon_diplay);

        convertView.setOnClickListener(new View.OnClickListener()
        {
            //@Override
            public void onClick(View v)
            {
            }
        }
    }


}

这篇关于在ListView控件onItemClick侦听器未在TabHost工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 01:10