我有一个 android 屏幕,它接收用户的电子邮件。下面是代码片段,我想删除出现在文本下方的下划线。
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:hint="@string/email"
android:textColorHint="@color/blueBackground"
app:boxBackgroundColor="@color/input_background"
app:boxCornerRadiusBottomEnd="20dp"
app:boxCornerRadiusBottomStart="20dp"
app:boxCornerRadiusTopEnd="20dp"
app:boxCornerRadiusTopStart="20dp"
app:endIconMode="clear_text"
app:endIconTint="@color/blueBackground"
app:hintTextColor="@color/blueBackground">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/blueBackground"
android:textSize="18sp"
android:layout_margin="8dp" />
</com.google.android.material.textfield.TextInputLayout>
Run Code Online (Sandbox Code Playgroud)
我曾尝试android:background="@null"和
<item name="colorControlNormal">@android:color/transparent</item>
<item name="colorControlActivated">@android:color/transparent</item>
但它不起作用。
我正在使用Retrofit2进行API解析.
虽然使用retrofit1.9.0post和get方法都能正常工作.但是retrofit 2.1.0在get方法中使用时会出现错误:
java.lang.IllegalArgumentException:baseUrl必须以/结尾
我检查了我的代码,没有问题,它正在为post方法工作.
Retrofit retrofit= new Retrofit.Builder()
.baseUrl("sample.com/ecomtest/index.php?route=api/")
.addConverterFactory(GsonConverterFactory.create())
.build();
Run Code Online (Sandbox Code Playgroud) 我已经创建了带有选取框的 TextView,但我想删除末尾之间的空白并再次开始显示文本。
这是屏幕
https://i.stack.imgur.com/dfdT8.png
这是我的布局
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="dkfjdkf jdfjfsfjkfa asdfjakjfdkasf sfdjaskfjdksf sfdjsfjk gfhgfhfai ggfghgf" />
Run Code Online (Sandbox Code Playgroud)