Android Textview texte coupé en bas
Donc, j'ai 2 textviews, l'un au-dessus de l'autre, mais quand le deuxième mode texte est peuplé la coupe est coupée en bas. Le textview, intitulé header_subtitle a la question
Clairement Im manque quelque chose d'évident, mais je sais pas quoi.
[Question]Un
Voici le code:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
layout="@layout/search_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone" />
<RelativeLayout
android:id="@+id/container_results"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:visibility="gone">
<LinearLayout
android:id="@+id/container_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/product_results_header_height"
android:orientation="vertical"
android:padding="?marginNormal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical" >
<FeatureTextView
android:id="@+id/header_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="?taTitleXL" />
<FeatureTextView
android:id="@+id/header_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:layout_gravity="fill"
android:textAppearance="?taTitleXL"
android:padding="1sp"
android:visibility="gone"/>
</LinearLayout>
<Spinner
android:id="@+id/sort_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="?marginNormal" />
<FeatureButton
android:id="@+id/refine_btn"
style="?buttonTertiary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="?marginNormal"
android:text="@string/product_results_refine" />
</LinearLayout>
<SimpleFlowLayout
android:id="@+id/category_links"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?marginSmall"
android:horizontalSpacing="?marginTiny"
android:maxLines="2" />
</LinearLayout>
<include
android:id="@+id/divider_horizontal"
layout="@layout/divider_horizontal"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_size"
android:layout_below="@+id/container_header" />
<FeatureTextView
android:id="@+id/browse_no_results"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/divider_horizontal"
android:layout_margin="?marginNormal"
android:text="@string/product_results_no_results"
android:textAppearance="?taTitleM"
android:visibility="gone" />
<GridView
android:id="@+id/product_grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/divider_horizontal"
android:numColumns="@integer/product_grid_cols"
android:overScrollMode="@null"
android:stretchMode="columnWidth" />
<include
android:id="@+id/progress_footer"
layout="@layout/loading"
android:layout_width="@dimen/progress_view_height"
android:layout_height="@dimen/progress_view_height"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
<NoFilteredResultsView
android:id="@+id/noFilteredResults"
android:layout_below="@id/divider_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<include
android:id="@+id/coach_mark"
layout="@layout/view_coach_mark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/coach_mark_margin_end"
android:layout_marginTop="@dimen/coach_mark_margin_top" />
</RelativeLayout>
</FrameLayout>
- Pouvez-vous préciser ce que textview est coupée, et, si possible, fournir une capture d'écran? Aussi, soyez prudent avec qui nichaient les mises en page, probablement, vous pouvez avoir moins de niveaux que la disposition de la hiérarchie (seulement les performances et la lisibilité de la pointe)
- qui textview est-il? Il ressemble à votre mise en page n'est pas assez grand.
- Ah désolé, c'est la header_subtitle
Vous devez vous connecter pour publier un commentaire.
L'un de vos LinearLayouts a la hauteur réglée sur "fill_parent". changer pour "wrap_content".
Aussi, supprimer les min_height attribut. Yout ont deux objets textfield là, il semble que vous êtes tout à fait ok avec le deuxième se couper.
C'est un peu dur de dire ce que vous allez pour, mais à voir si cela aide.
je sais que c'est trop tard, mais c'est un travail comme un charme pour moi. ajoutez ce code à votre textview
android:ellipsize="rectangle de sélection"
android:layout_weight="1"