android – 为什么我的Button的文字会被截断?

android – 为什么我的Button的文字会被截断?,第1张

概述我有一个正常的按钮,但是文字截断了.我不知道为什么会这样. 有谁可以分析它为什么会发生? 码: <TextView android:id="@+id/txt_project_title" android:layout_width="fill_parent" android:layout_height="wrap_content" a 我有一个正常的按钮,但是文字被截断了.我不知道为什么会这样.

有谁可以分析它为什么会发生?

码:

<TextVIEw        androID:ID="@+ID/txt_project_Title"        androID:layout_wIDth="fill_parent"        androID:layout_height="wrap_content"        androID:gravity="center_horizontal"        androID:text="Default Title"        androID:textcolor="@androID:color/white"        androID:textStyle="bold"        androID:textSize="19sp"        androID:shadowcolor="#000000"         androID:shadowDx="1.5"         androID:shadowDy="1.5"         androID:shadowRadius="1"        /></linearLayout>      <ScrollVIEw            androID:layout_wIDth="fill_parent"            androID:layout_height="wrap_content">         <linearLayout  xmlns:androID="http://schemas.androID.com/apk/res/androID"  androID:layout_wIDth="fill_parent"  androID:layout_height="fill_parent"  androID:orIEntation="vertical"> <linearLayout  xmlns:androID="http://schemas.androID.com/apk/res/androID"  androID:layout_wIDth="wrap_content"  androID:layout_height="wrap_content"  androID:layout_gravity="center"  androID:background="@drawable/whitebg"  androID:layout_margintop="5dp"  androID:layout_marginBottom="5dp"  androID:orIEntation="vertical">     <linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"    androID:orIEntation="horizontal"    androID:layout_wIDth="fill_parent"    androID:layout_height="wrap_content"    androID:layout_margintop="3dp"    >  <ImageVIEw        androID:ID="@+ID/project_image"        androID:layout_marginleft="10dp"        androID:layout_margintop="10dp"           androID:layout_wIDth="100dp"        androID:layout_height="100dp"        androID:layout_weight="3"         androID:layout_gravity="center_vertical"/>  <linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"    androID:orIEntation="vertical"    androID:layout_wIDth="wrap_content"    androID:layout_height="wrap_content"    androID:layout_alignParentRight="true"    androID:padding="10dp"    androID:layout_weight="5"     >    <TextVIEw        androID:ID="@+ID/txt_project"        androID:layout_wIDth="181dp"        androID:layout_height="wrap_content"        androID:text="Project Title"        androID:textcolor="#0e3946"        androID:textSize="16sp"        androID:textStyle="bold" />    <TextVIEw        androID:ID="@+ID/txt_organization_Title"        androID:layout_wIDth="fill_parent"        androID:layout_height="wrap_content"        androID:text="Organization Title"        androID:textSize="13sp"        androID:textStyle="italic"        androID:textcolor="#20822c"/>    <linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"    androID:orIEntation="horizontal"    androID:layout_wIDth="fill_parent"    androID:layout_height="wrap_content"    androID:layout_margintop="3dp"    >     <CheckBox androID:ID="@+ID/checkBox"        androID:layout_wIDth="wrap_content"        androID:button="@androID:drawable/btn_star"        androID:layout_gravity="center"        androID:layout_height="wrap_content"/>      <TextVIEw          androID:layout_wIDth="fill_parent"          androID:layout_height="wrap_content"          androID:layout_gravity="center"          androID:text="als Favorit markIEren"          androID:textcolor="#000000"          androID:textSize="12sp" />    </linearLayout>      <TextVIEw            androID:layout_margintop="3dp"            androID:layout_marginleft="3dp"            androID:ID="@+ID/txt_amount"            androID:layout_wIDth="wrap_content"             androID:layout_height="15dp"            androID:textStyle="bold"            androID:textcolor="#0E3946"            androID:textSize="12sp"            androID:text=" "            androID:layout_alignParentRight="true"            />      <button          androID:layout_margintop="3dp"           androID:ID="@+ID/btn_sms_spenden"          androID:layout_wIDth="wrap_content"          androID:layout_height="wrap_content"          androID:text="Jetzt Spenden!"          androID:textSize="13sp"          androID:textcolor="#0e3946"          androID:textStyle="bold"          />      </linearLayout> </linearLayout>

图片:

解决方法 尝试添加填充到按钮

androID:padding

总结

以上是内存溢出为你收集整理的android – 为什么我的Button的文字会被截断?全部内容,希望文章能够帮你解决android – 为什么我的Button的文字会被截断?所遇到的程序开发问题。

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

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

原文地址: https://outofmemory.cn/web/1137951.html

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

发表评论

登录后才能评论

评论列表(0条)

保存