添加一个imageview后滑动有点卡顿

添加一个imageview后滑动有点卡顿

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.xudongting.moocshowapp.MainActivity">

    <SearchView
        android:id="@+id/searchView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:iconifiedByDefault="false"
        android:queryHint="亲,想搜索啥子呢?" />

    <ListView
        android:layout_below="@id/searchView"
        android:id="@+id/listView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

    </ListView>
    <ImageView
        android:layout_marginBottom="20dp"
        android:layout_marginRight="20dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:src="@drawable/timg"
        android:layout_width="60dp"
        android:layout_height="60dp" />


</RelativeLayout>

http://img1.sycdn.imooc.com//climg/5ac4c62100019ac405370875.jpg

就是不添加这个imageview之前滑动很流畅,添加之后就有点卡顿了,这个是模范作业里面那个悬浮的红色邮件,这样添加有没有问题呢?

正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕雪 2018-04-06 10:54:14

单看xml,卡不卡这跟你加的imageView没有关系。是不是有其他的操作呢?另:作业中对你增加的imageView没有要求。你也可以提交作业的同时,显眼处写上你的疑惑。如果老师看到会在批复文档中回复你。祝:学习愉快

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
Android数据通信开发与应用2018版
  • 参与学习           人
  • 提交作业       147    份
  • 解答问题       687    个

本专题介绍了Android开发核心组件:广播、服务及全局应用。教会你如何使用AIDL、Thread、Socket、蓝牙解决进程线程间通信问题。利用Glide等实现异步加载及NDK原生代码开发。

了解课程
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师