在Android中将两个EditBox合并为一个EditBox
我是android新手。 我想把两个EditBox合并成一个EditBox。 这里谁都可以帮我。 提前谢谢。在Android中将两个EditBox合并为一个EditBox,android,editbox,Android,Editbox,我是android新手。 我想把两个EditBox合并成一个EditBox。 这里谁都可以帮我。 提前谢谢。 我不知道你是不是在说用户界面。但是您可以通过get text方法从编辑文本中获取文本。为什么不能将两个文本合并为一个字符串,并在程序中使用组合字符串 为垂直方向的线性布局提供背景,并在其中添加两个透明文本框 <LinearLayout android:layout_width="match_parent" android:layout_height="match_paren
我不知道你是不是在说用户界面。但是您可以通过get text方法从编辑文本中获取文本。为什么不能将两个文本合并为一个字符串,并在程序中使用组合字符串 为垂直方向的线性布局提供背景,并在其中添加两个透明文本框
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_of_big_edittext"
android:orientation="vertical" >
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_of_your_divider" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent" />
</LinearLayout>
为什么要加入它们如果为开始位置和结束位置创建单独的edittext,则效果更好您不能将两个edittext合并为一个。您需要使用两个edittext并将应用程序设计成这样。我知道如何添加两个字符串。但我想加入屏幕截图中显示的两个编辑框。