如何倾听Cover flow的行为

时间:2012-10-01 11:08:51

标签: android

我最近使用Cover flow,

我想听一下照片停止滚动的行为

我使用了setOnFocusChangeListener和setOnItemSelectedListener

但它不起作用,任何人都可以教我吗?

编辑:

this.setContentView(R.layout.cover_flow);
    final AppCoverflow coverflow = (AppCoverflow) this
            .findViewById(R.id.coverflow);
    coverflow.setAdapter(new AppCoverflowAdapter(context, allMusicObjects));
    AppCoverflowAdapter adapter = new AppCoverflowAdapter(context,
            allMusicObjects);
    coverflow.setAdapter(adapter);
    coverflow.setAnimationDuration(10000);
    coverflow.setOnItemClickListener(this);
    coverflow.setOnItemSelectedListener(new OnItemSelectedListener() {

        @Override
        public void onItemSelected(AdapterView<?> arg0, View arg1,
                final int arg2, long arg3) {
            targetObject = allMusicObjects.get(arg2);
        }

        @Override
        public void onNothingSelected(AdapterView<?> arg0) {
        }
    });

0 个答案:

没有答案