Q:

Edit Text first character as $

I am working on one of my android project.
what I want is to keep first character as $ in my Edit text and user should not remove this first character by pressing back button of soft keyboard.
any help will be appreciated.

A:

I think for this you have to use a layout like below.Here the dollar symbol is set in a text view and an EditText is place near to it. As the comments in your question said this is one of the best way to achieve this. if you want the text from Edittext including the $ symbol append it with the Text in EdtText. 
<LinearLayout

    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >

    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="$"
        android:textColor="@android:color/black"
        android:layout_marginLeft="10dip" />
    <EditText
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:hint="price"
        android:textColor="@android:color/black" />
</LinearLayout>

For get the text including $ symbol do this:
String text = et_text.getText().toString();
String text_withsymbol = "$" + et_text.getText().toString();

