如何在android中使用Text&image创建EditText提示/占位符.我这样写
<EditText
android:id="@+id/name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:lines="1"
................................
...............................
android:drwableLeft="@drawable/image1"
android:hint="enter name here"/>
Run Code Online (Sandbox Code Playgroud)
在这里,我们可以在edittext中看到图像和文本(提示),但即使用户在该字段中输入内容,图像仍然可见.我的要求是如果EditText中没有文字显示提示与图像,如果EditText不为空隐藏提示文本和图像
为了使用Android Studio开发Android应用程序,通常我们用来添加依赖项build.gralde
而不是添加jar或库.下面给出的例子
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.google.android.gms:play-services:9.2.1'
Run Code Online (Sandbox Code Playgroud)
如何在Android Studio中创建自己的gradle依赖库?
android build-dependencies build.gradle android-gradle-plugin android-studio-2.1