سلام ، من یه فرگمنت دارم که کدهای گرافیگش به این صورت هست
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 201 202 203 204 205 206 207 208 209 210 211 212 213 | <LinearLayout android:layout_width= "match_parent" android:layout_height= "match_parent" android:background= "@android:color/white" android:orientation= "vertical" tools:context= "com.example.school.app.ViewPagerFragment.GozareshFragment" > <LinearLayout android:layout_width= "match_parent" android:orientation= "horizontal" android:background= "@color/divider" android:paddingLeft= "5dp" android:paddingRight= "5dp" android:minHeight= "?attr/actionBarSize" android:layout_height= "wrap_content" > <LinearLayout android:layout_width= "0dp" android:layout_weight= "1" android:orientation= "horizontal" android:gravity= "center" android:layout_height= "match_parent" > <LinearLayout android:layout_width= "wrap_content" android:background= "@drawable/counter_background" android:layout_height= "wrap_content" > <TextView android:layout_width= "wrap_content" android:textAppearance= "?android:attr/textAppearanceSmall" android:textColor= "@android:color/white" android:text= "223" android:layout_height= "wrap_content" android:id= "@+id/grp_name" /> </LinearLayout> <TextView android:id= "@+id/header_tree_text" android:layout_width= "wrap_content" android:layout_height= "wrap_content" android:textSize= "16sp" android:textColor= "@android:color/white" android:layout_marginLeft= "2dp" android:layout_marginStart= "2dp" android:text= "گروه درسی :" /> </LinearLayout> <LinearLayout android:layout_width= "0dp" android:layout_weight= "1" android:orientation= "horizontal" android:gravity= "center" android:layout_height= "match_parent" > <LinearLayout android:layout_width= "wrap_content" android:background= "@drawable/counter_background" android:layout_height= "wrap_content" > <TextView android:layout_width= "wrap_content" android:textAppearance= "?android:attr/textAppearanceSmall" android:textColor= "@android:color/white" android:text= "45" android:layout_height= "wrap_content" android:id= "@+id/Teda_tekrar" /> </LinearLayout> <TextView android:id= "@+id/header_two_text" android:layout_width= "wrap_content" android:layout_height= "wrap_content" android:textSize= "16sp" android:textColor= "@android:color/white" android:layout_marginLeft= "2dp" android:layout_marginStart= "2dp" android:text= "تعداد کل سوال :" /> </LinearLayout> <LinearLayout android:layout_width= "0dp" android:layout_weight= "1" android:gravity= "center" android:orientation= "horizontal" android:layout_height= "match_parent" > <LinearLayout android:layout_width= "wrap_content" android:background= "@drawable/counter_background" android:layout_height= "wrap_content" > <TextView android:layout_width= "wrap_content" android:textAppearance= "?android:attr/textAppearanceSmall" android:textColor= "@android:color/white" android:text= "4" android:layout_height= "wrap_content" android:id= "@+id/Shomare_soal" /> </LinearLayout> <TextView android:id= "@+id/header_one_text" android:layout_width= "wrap_content" android:layout_height= "wrap_content" android:textSize= "16sp" android:textColor= "@android:color/white" android:layout_marginLeft= "2dp" android:layout_marginStart= "2dp" android:text= "شماره سوال: " /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width= "match_parent" android:orientation= "vertical" android:padding= "5dp" android:layout_height= "match_parent" > <LinearLayout android:layout_width= "match_parent" android:gravity= "center_vertical" android:orientation= "horizontal" android:layout_height= "0dp" android:padding= "5dp" android:layout_weight= "1" > <TextView android:id= "@+id/page3_text_english" android:layout_width= "0dp" android:layout_weight= "6" android:background= "#fff5f5f5" android:lines= "1000" android:singleLine= "false" android:maxLines= "1000" android:layout_height= "match_parent" android:textIsSelectable= "true" /> </LinearLayout> <LinearLayout android:layout_width= "match_parent" android:gravity= "center_vertical" android:orientation= "horizontal" android:layout_height= "0dp" android:padding= "5dp" android:layout_weight= "1" > <TextView android:id= "@+id/page3_text_farsi" android:layout_width= "0dp" android:background= "#fff5f5f5" android:layout_weight= "6" android:layout_height= "match_parent" android:singleLine= "false" android:maxLines= "1000" android:scrollIndicators= "top" /> </LinearLayout> <LinearLayout android:layout_width= "match_parent" android:gravity= "center_vertical" android:orientation= "horizontal" android:layout_height= "0dp" android:padding= "5dp" android:layout_weight= "1" > <Button android:layout_width= "0dp" android:layout_weight= "1" android:background= "@drawable/selector_button" android:text= "چهارمی" android:textColor= "@android:color/white" android:textAppearance= "?android:attr/textAppearanceSmall" android:layout_height= "36dp" android:id= "@+id/jump" /> <Button android:layout_width= "0dp" android:layout_weight= "1" android:text= "سومی" android:layout_marginLeft= "5dp" android:layout_marginStart= "5dp" android:background= "@drawable/selector_button" android:textColor= "@android:color/white" android:textAppearance= "?android:attr/textAppearanceSmall" android:layout_height= "36dp" android:id= "@+id/showanswer" /> <Button android:layout_width= "0dp" android:layout_weight= "1" android:text= "دومی" android:layout_marginRight= "5dp" android:layout_marginLeft= "5dp" android:background= "@drawable/selector_button" android:textColor= "@android:color/white" android:textAppearance= "?android:attr/textAppearanceSmall" android:layout_height= "36dp" android:id= "@+id/back" /> <Button android:layout_width= "0dp" android:layout_weight= "1" android:background= "@drawable/selector_button" android:text= "اولی" android:textColor= "@android:color/white" android:textAppearance= "?android:attr/textAppearanceSmall" android:layout_height= "36dp" android:id= "@+id/Next" /> </LinearLayout> </LinearLayout> </LinearLayout> |
دو مشکل دارم:
اول اینکه با وجودی اینکه قابلیت اسکرول برای تکست ها باکس ها گذاشتم و تکست باکس ها اسکرول میشن اما میله
اسکرول لبه TextView نشون داده نمیشه ، اینجوری خیلی از کاربران برنامه چون میله اسکرولو نمی بینن متوجه نمیشن که می توتن محتوای
تکست رو اسکرول کنن
دوم هم اینکه چون باکس دوم متن خیلی کمتری می گیره ، میخوام اندازه باکس دوم یعنی باکس پایین تر نصف بشه ، بعد به همون اندازه که باکس دوم نصف شده باکس اول ارتفاع بیشتری بگیره اما نمی دونم چطور باید این کارو انجام بدم