I know I've seen this question a thousand times by now, but haven't found an answer that has worked. In my app I have an Edittext box. When I run the app on the emulator or my phone, no text shows when typing in the edittext. The cursor moves, and I can get the value that I typed in, just nothing shows while typing. I've tried changing the color of the text, the color of the background and every other solution that I've come across, but nothing has worked.
Here is my xml for the edittext
<EditText android:id="@+id/editChannel_no"
android:layout_toRightOf="@+id/Channo"
android:layout_width="35dp"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/Channo"
android:inputType="number"
android:hint="2"
android:cursorVisible="true" />
Here is the only code used with the edittext
EditText editChannel_no;
Button btnSearch;
Button btnShowAll;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//<item android:id="@+id/action_settings" android:title="@string/action_settings"
//android:orderInCategory="100" app:showAsAction="never" />
editChannel_no=(EditText)findViewById(R.id.editChannel_no);
editChannel_no.requestFocus();
btnSearch=(Button)findViewById(R.id.btnSearch);
btnShowAll=(Button)findViewById(R.id.btnShowAll);
editChannel_no.setTextColor(Color.BLACK);
I've been trying to find a solution for 2 days now, and anyone that solves this will be my hero.
Thanks