如何解决在Android中编辑聊天应用程序的文本设计
我需要像这样设计编辑文本
是否使用图像视图创建了附件文件图标和其他图标? 还是有一个库可以像这样编辑文本?
解决方法
您可以使用imageview显示它们,但是通常使用ImageButtons。 我认为没有用于此简单任务的库。 以xml为例:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="#00CCCC"
>
<RelativeLayout
android:background="@drawable/bottombar"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
<ImageButton
android:id="@+id/buttonLeft"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/buttonlayout">
</ImageButton>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:hint="Type here!">
</EditText>
<ImageButton
android:id="@+id/b1"
android:layout_alignParentRight="true"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/buttonlayout">
</ImageButton>
<ImageButton
android:id="@+id/b2"
android:layout_toLeftOf="@id/b1"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/buttonlayout">
</ImageButton>
<ImageButton
android:layout_toLeftOf="@id/b2"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/buttonlayout">
</ImageButton>
</RelativeLayout>
</RelativeLayout>
这看起来像这样:Fermat's little theorem
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。