java–Android Textview文本在底部被截断

java–Android Textview文本在底部被截断,第1张

概述所以我有2个文本视图,一个在另一个之上,但是当填充第二个文本视图时,剪切在底部截断.标题为header_subtitle的textview存在问题很明显我错过了一些明显的东西,但不知道是什么.[Issue]1这是代码:<FrameLayoutxmlns:android="http://schemas.android.com/apkes/android"

所以我有2个文本视图,一个在另一个之上,但是当填充第二个文本视图时,剪切在底部被截断.标题为header_subTitle的textvIEw存在问题

很明显我错过了一些明显的东西,但不知道是什么.
[Issue]1

这是代码:

<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"                                        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>

解决方法:

其中一个linearLayouts的高度设置为“fill_parent”.将其更改为“wrap_content”.

另外,删除min_height属性. Yout在那里有两个文本区域,所以看起来你完全可以完成第二次切断.

要告诉你的目标很难,但看看是否有帮助.

总结

以上是内存溢出为你收集整理的java – Android Textview文本在底部被截断全部内容,希望文章能够帮你解决java – Android Textview文本在底部被截断所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1116459.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存