我正在开发一个项目,我正在使用圆形按钮,EditText字段等.但是,当我尝试从其矩形设计中更改Facebook和Google按钮的形状时,没有任何反应.我正在使用XML脚本在按钮和编辑文本字段上使用来改变他们的设计,但这似乎没有遵循社交登录按钮...所需的设计取自AirBnB的应用程序,据我所知使用JavaScript的React框架实现,但我假设必须有一种方法来使用XML/Java实现相同的结果......?
任何帮助将不胜感激,如果有任何其他需要上传,请求!
android facebook button facebook-social-plugins google-signin
所以一段时间以来,我一直在尝试解决 EditText 字段的问题,因为它没有显示提示或实际文本所在的单行。通常情况下,这条线默认是黑色的,所以我的问题是这样的;如何使线条再次显示,以及如何更改它的颜色?(我认为 android:backgroundHint 可以解决问题,但是我根本看不到该行,因此无法对其进行测试)。我正在使用 API 24/25。
下面是我的 XML 代码示例以及模拟器输出:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_register"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.michael.whatsupldn.RegisterActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Name"
android:layout_margin="16dp"/>
</LinearLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
我的styles.xml 代码
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="EditTextTheme">
<!-- Used for the bottom line when not selected / focused -->
<item name="colorControlNormal">#FAFAFA</item>
<!-- colorControlActivated & colorControlHighlight use the …Run Code Online (Sandbox Code Playgroud)