I have an activity consisting of 3 EditText fields (amongst other things like TextViews and a few buttons). I also have an AutoCompleteTextView with a list of String\'s usin
In fact your text is being typped, but that's a little bug that makes your text color be the same as your background, so you don't see it. This can be easily fixed by doing 2 things:
1) Simply change the textColor of your EditText, either defining it in the layout:
android:textColor="..."
or dynamically:
EditText et = (EditText) findViewById(R.id.your_edittext);
et.setTextColor(Color.RED);
2) Change the extended theme in your manifest:
<application android:theme="@style/Theme.Light.NoTitleBar.Workaround" ... >
3) Create the new theme at res/values/themes.xml which uses fixed styles:
<style name="Theme.Light.NoTitleBar.Workaround" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewLight</item>
<item name="android:dropDownItemStyle">@style/Widget.DropDownItemLight</item>
</style>
4) Now these styles, located at res/values/styles.xml should fix the color:
<style name="AutoCompleteTextViewLight" parent="@android:style/Widget.AutoCompleteTextView">
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
<style name="Widget.DropDownItemLight" parent="@android:style/Widget.DropDownItem">
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
I know it's a mess, but try it and if it works, try finding a combination of those attributes that fit to your layout.
It works for me may be helpful to others as well, open your manifest file and set hardwareAccelerated="true".
<application
android:allowBackup="true"
.....
android:hardwareAccelerated="true">
For more about HardwareAccelerated https://developer.android.com/guide/topics/graphics/hardware-accel.html
Ok, so I worked out what the issue was!
The code which I didn't post because I thought it was 'irrelevant' contained a thread
public static Runnable updateTimerMethod = new Runnable()
{
public void run()
{
sessionTimer.setText(TimerHandler.theTime);
myHandler.postDelayed(this, 0);
}
};
I realised that the thread was basically taking up all of the activity (I don't really know how to explain that properly) by having the postDelayed as 0. Once I changed this to say... 100, then the EditText worked.
Thank you to @NKN who helped me.
This may be specific to me, but hopefully this will help somebody else.