Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Error:(134, 36) 错误: 不兼容的类型: PullToRefreshListView无法转换为AdapterView<?> #1871

Description

@AllenCoder
   if (this.expandList!= null) {
            ((AdapterView<?> ) this.expandList).setOnItemClickListener(new OnItemClickListener() {

                @Override
                public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                    AllIndexAssetActivity_.this.itemOnclick(position);
                }
            }
            );
        }

when i upgrade 4.1.0 FAILURE: Build failed with an exception.

PullToRefreshListView cannot transform AdapterView

Activity

  1. AllenCoder commented on Oct 9, 2016

    @AllenCoder
    Author

    this is 4.0.0

      @Override
        public void onViewChanged(HasViews hasViews) {
            this.expandList = ((PullToRefreshListView) hasViews.findViewById(R.id.expand_list));
            if (this.expandList!= null) {
                this.expandList.setOnItemClickListener(new OnItemClickListener() {
    
                    @Override
                    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                        FixedProductFragement_.this.itemClick(position);
                    }
                }
                );
            }
            afterView();
        }
  2. dodgex commented on Oct 10, 2016

    @dodgex
    Member

    duplicate of #1845

    I'll close this in favour ot the previous issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions