how to show floating widgets(edit text and buttons) in android
Date : March 29 2020, 07:55 AM
To fix the issue you can do Pop up or custom Alert dialog may solve your problem. But simple solution is take another layout in xml of the activity. In that layout add those edittexts and buttons. Set its visibility to false. And when you want to show then, make layout's visibility to true.
|
If edit text contains spaces then show error
Date : March 29 2020, 07:55 AM
hope this fix your issue There should be no " " space in the EditText is what you want. Nobody will provide you with a ready working code. Here are some pointers to proceed. String a = text.getText().toString();");
String s= String from edittext;
boolean p=s.contains(" ");
if(p)
//call function for error
else
//safe to proceed
|
Attach a show button to edit text field android
Date : March 29 2020, 07:55 AM
hop of those help? Create drawable xml for your button and edittext and set them as background... Take a LinearLayout with orientation horizontal and weightsum == 1 and put both in it button_border.xml <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/darker_gray"/>
<stroke
android:width="1px"
android:color="@android:color/darker_gray"/>
</shape>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/white"/>
<stroke
android:width="1px"
android:color="@android:color/darker_gray"/>
</shape>
<LinearLayout
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:weightSum="1" >
<EditText
android:id="@+id/et"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".8"
android:text="aaa"
android:background="@drawable/edit_border" />
<Button
android:id="@+id/bt"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".2"
android:text="Send"
android:background="@drawable/button_border" />
</LinearLayout>
|
I want to make Edit text clickable so that when i click on it, it should show a text like one android studio
Date : March 29 2020, 07:55 AM
To fix this issue this is my code I want to add a text whenever I click on edit text. , To make an editText clickable editText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
// do things you want
}
});
|
show spinner at the time of clicking edit text in Android?
Date : March 29 2020, 07:55 AM
|