android listview _____在点击listview的item时背景变色 点击释放时背景变为无色且跳转别的activity(listview _____在点击listview的项目时背景变色点击释放时背景变为无色且跳转别的活动)

android listview _____在点击listview的item时背景变色 点击释放时背景变为无色且跳转别的activity(listview _____在点击listview的项目时背景变色点击释放时背景变为无色且跳转别的活动)

ID:13435325

大小:29.50 KB

页数:9页

时间:2018-07-22

android listview _____在点击listview的item时背景变色 点击释放时背景变为无色且跳转别的activity(listview _____在点击listview的项目时背景变色点击释放时背景变为无色且跳转别的活动)_第1页
android listview _____在点击listview的item时背景变色 点击释放时背景变为无色且跳转别的activity(listview _____在点击listview的项目时背景变色点击释放时背景变为无色且跳转别的活动)_第2页
android listview _____在点击listview的item时背景变色 点击释放时背景变为无色且跳转别的activity(listview _____在点击listview的项目时背景变色点击释放时背景变为无色且跳转别的活动)_第3页
android listview _____在点击listview的item时背景变色 点击释放时背景变为无色且跳转别的activity(listview _____在点击listview的项目时背景变色点击释放时背景变为无色且跳转别的活动)_第4页
android listview _____在点击listview的item时背景变色 点击释放时背景变为无色且跳转别的activity(listview _____在点击listview的项目时背景变色点击释放时背景变为无色且跳转别的活动)_第5页
资源描述:

《android listview _____在点击listview的item时背景变色 点击释放时背景变为无色且跳转别的activity(listview _____在点击listview的项目时背景变色点击释放时背景变为无色且跳转别的活动)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、AndroidListView_____在点击ListView的Item时背景变色点击释放时背景变为无色且跳转别的Activity(ListView_____在点击ListView的项目时背景变色点击释放时背景变为无色且跳转别的活动)AndroidListView.Clickonthebackgroundcolorrelease...ClicktheListViewItemwhenthebackgroundiscolorlessandjumpanotherActivity._BaiduknowBaid

2、uhomepage

3、Baiduknow

4、

5、loginregistrationPostBarnewspageMP3photovideoencyclopedialibraryhelp

6、setBaiduknows>Computer/Network>programming>JAVArelatedAndroidListView...WhenclickedonListView'sItem,thebackgroundcolorischanged.Whenclicked,thebackgroundbecomescol

7、orlessandjumpstoanotherActivity.Questioner:2011-7-2517:17newnife

8、rewardpoints:40

9、Views:6262011-7-2518:17,thebestanswerislv.setOnTouchListener(NewOnTouchListener(){@OverridePublic,Boolean,onTouch(View,V,MotionEvent,event){Auto-generatedmethodstub//TODO(i

10、f)(event.getAction==MotionEvent.ACTION_DOWN){Lv.setBackgroundColor(Color.BLUE);}Elseif(event.getAction)(==MotionEvent.ACTION_UP){Lv.setBackgroundColor(Color.BLACK);Intent,intent,=new,Intent(Activity1.this,Activity2.class);StartActivity(intent);}Returnfa

11、lse;}})questioninggrace.So,whatdoIwanttodowithpostion'sitemforListView?Also,ItriedtheLVplustouchevent.No,touchisthewholelv..NotLv'sitem.Justanswerthis,butdouble-clickLv.setOnItemClickListener(new,OnItemClickListener(){@OverridePublic,void,onItemClick(Ad

12、apterView<,>,arg0,View,arg1,int,arg2,Long,ARG3){Arg1=arg0.getChildAt(arg2);Arg1.setOnTouchListener(new,OnTouchListener(){@OverridePublic,Boolean,onTouch(View,V,MotionEvent,event){Switch(event.getAction()){CaseMotionEvent.ACTION_DOWN:V.setBackgroundColor

13、(Color.BLUE);Break;CaseMotionEvent.ACTION_UP:V.setBackgroundColor(Color.YELLOW);Intent,intent,=new,Intent(Activity04.this,Activity03.class);V.setBackgroundColor(Color.BLACK);StartActivity(intent);}Returntrue;}});}});agreewithTwoAnswer:turntoTA_stefanie_

14、fromAndroid

15、threeteamdevelopmentallianceadoptionrate:34%Goodfield:JAVArelatedprogramming,firefighting,WarringStates,runningkart,entertainmentandleisureParticipation:anactivitythatwastemporarilyabsent;anquestioner'sassessmentofthe

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。