I'm creating an Android app and i need to add text on a picture. I need to do a snapchat-like to add my text : I managed to display an editText when you click on the picture but then i have to tap again on the EditText to display the keyboard. But I need only one click to display the EditText AND the Keyboard.
Thanks for your help.
ImageView iv = (ImageView)findViewById(R.id.imageView1);
iv.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
EditText et=(EditText)findViewById(R.id.editText1);
et.setVisibility(View.VISIBLE);
}
});
in case someone is in the same problem, here's the answer :
And for the XML file set the EditText like this :
android:visibility="invisible"