作业问题 ScrollView
我在布局上添加了ScrollView
标签,但是在真机运行的时候滑动不到最低端,发现页会看不见最后一项,也看不见查看更多那一栏
代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | <RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" xmlns:app= "http://schemas.android.com/apk/res-auto" tools:context= "com.imooc.imoochomework.fragment.FindFragment" > <ScrollView android:layout_width= "match_parent" android:layout_height= "wrap_content" > <RelativeLayout android:layout_width= "match_parent" android:layout_height= "wrap_content" > <TextView android:id= "@+id/find_header" android:layout_width= "wrap_content" android:layout_height= "wrap_content" android:text= "发现" android:textSize= "30dp" android:layout_centerHorizontal= "true" android:layout_marginTop= "10dp" android:layout_marginBottom= "10dp" /> <ImageView android:layout_width= "40dp" android:layout_height= "wrap_content" android:src= "@drawable/find_news" android:layout_alignParentRight= "true" android:layout_marginRight= "10dp" /> <View android:id= "@+id/find_line" android:layout_below= "@id/find_header" android:layout_width= "match_parent" android:layout_height= "1dp" android:background= "#D8DDE1" /> <android.support.v7.widget.RecyclerView android:id= "@+id/rec_find" android:layout_marginTop= "10dp" android:layout_below= "@id/find_line" android:layout_width= "match_parent" android:layout_height= "wrap_content" > </android.support.v7.widget.RecyclerView> <View android:id= "@+id/find_line02" android:layout_below= "@id/rec_find" android:layout_width= "match_parent" android:layout_height= "1dp" android:layout_marginTop= "10dp" android:layout_marginBottom= "10dp" android:background= "#D8DDE1" /> <android.support.v7.widget.RecyclerView android:id= "@+id/find_double_menu" android:layout_below= "@id/find_line02" android:layout_width= "match_parent" android:layout_height= "wrap_content" /> <View android:id= "@+id/find_line03" android:layout_below= "@id/find_double_menu" android:layout_width= "match_parent" android:layout_height= "1dp" android:layout_marginTop= "10dp" android:layout_marginBottom= "10dp" android:background= "#D8DDE1" /> <RelativeLayout android:layout_below= "@id/find_double_menu" android:id= "@+id/travel" android:layout_width= "match_parent" android:layout_height= "wrap_content" > <TextView android:id= "@+id/travl_txt" android:layout_width= "match_parent" android:gravity= "center" android:layout_height= "wrap_content" android:text= "旅行PK" android:textSize= "20sp" android:layout_centerHorizontal= "true" android:paddingTop= "16dp" /> <ImageView android:layout_width= "55dp" android:layout_height= "55dp" android:src= "@drawable/find_reflesh" android:layout_alignParentRight= "true" android:layout_alignParentTop= "true" /> <LinearLayout android:layout_width= "wrap_content" android:layout_height= "wrap_content" android:orientation= "vertical" > </LinearLayout> <ImageView android:id= "@+id/pk1" android:layout_width= "170dp" android:layout_height= "100dp" android:src= "@drawable/find_pk1" android:layout_below= "@id/travl_txt" android:layout_marginLeft= "5dp" /> <ImageView android:id= "@+id/pk2" android:layout_toRightOf= "@id/pk1" android:layout_below= "@id/travl_txt" android:layout_width= "180dp" android:layout_height= "100dp" android:src= "@drawable/find_pk2" android:layout_marginLeft= "5dp" /> <ProgressBar android:layout_marginLeft= "5dp" android:id= "@+id/progress_left" android:layout_width= "170dp" android:layout_height= "wrap_content" android:layout_below= "@id/pk1" style= "@style/Widget.AppCompat.ProgressBar.Horizontal" android:progress= "64" android:progressDrawable= "@drawable/progress_style" android:clipOrientation= "horizontal" android:gravity= "right" android:max= "100" /> <ProgressBar android:layout_marginLeft= "5dp" android:id= "@+id/progress_right" android:layout_width= "160dp" android:layout_height= "wrap_content" android:layout_below= "@id/pk2" android:layout_toRightOf= "@id/pk1" style= "@style/Widget.AppCompat.ProgressBar.Horizontal" android:progress= "70" android:progressDrawable= "@drawable/progress_vertical_style" android:clipOrientation= "horizontal" android:gravity= "right" android:max= "100" /> <ImageView android:layout_width= "48dp" android:layout_height= "48dp" android:src= "@drawable/find_vs" android:layout_below= "@id/travl_txt" android:layout_centerHorizontal= "true" android:layout_marginTop= "70dp" /> <LinearLayout android:id= "@+id/dianzan" android:layout_width= "match_parent" android:layout_height= "65dp" android:layout_below= "@id/pk1" android:layout_marginTop= "30dp" > < include android:layout_width= "match_parent" android:layout_height= "wrap_content" layout= "@layout/dian_zan" /> </LinearLayout> <TextView android:id= "@+id/hotNew" android:layout_below= "@id/dianzan" android:layout_width= "match_parent" android:layout_height= "wrap_content" android:text= "热门头条" android:textSize= "20dp" android:layout_centerHorizontal= "true" android:layout_marginTop= "10dp" android:layout_marginBottom= "10dp" android:gravity= "center" /> <android.support.v7.widget.RecyclerView android:layout_below= "@id/hotNew" android:id= "@+id/hotNews" android:layout_width= "match_parent" android:layout_height= "wrap_content" /> <TextView android:id= "@+id/more" android:layout_below= "@id/hotNews" android:layout_width= "match_parent" android:layout_height= "wrap_content" android:text= "查看更多" android:textSize= "20dp" android:textColor= "@color/deeppink" android:layout_centerHorizontal= "true" android:layout_marginTop= "10dp" android:layout_marginBottom= "10dp" android:gravity= "center" /> </RelativeLayout> </RelativeLayout> </ScrollView> </RelativeLayout> |
12
收起
正在回答 回答被采纳积分+1
1回答
Android零基础入门2018版
- 参与学习 人
- 提交作业 5461 份
- 解答问题 7235 个
此次推出的专题为Android攻城狮培养计划的第一部分语法与界面基础篇,将带大家从0开始学习Android开发。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧