Hi,
I've got a problem with my app on HTC Tattoo
Basically on a input screenI use onTextChanged() on EditText elements to kick off a calculation that updates the output on the screen.
I have had a bug report from a user of a HTC Tattoo that the output does not get updated, which makes me thing the onTextChanged() isn't working for some reason ?!?!
Here is an example of one of my EditText elements
<EditText
android:layout_toRightOf="@+id/btn_id_1"
android:layout_alignTop="@+id/btn_id_1"
android:nextFocusUp="@+id/input_calc_2"
android:nextFocusDown="@+id/input_calc_2"
android:nextFocusLeft="@+id/input_calc_2"
android:nextFocusRight="@+id/input_calc_2"
android:text=""
android:hint="hint text"
android:id="@+id/input_calc_1"
android:layout_width="160sp"
android:layout_centerHorizontal="false"
android:inputType="phone"
android:maxLength="10"
android:textSize="12sp"
android:layout_height="35sp">
</EditText>
With
(EditText) edText = (EditText)findViewById(R.id.input_calc_1);
edText .addTextChangedListener(mUpdateListener);
private TextWatcher mUpdateListener= new TextWatcher()
{
public void afterTextChanged (Editable s)
{
// Log.d("seachScreen", "afterTextChanged");
}
public void beforeTextChanged (CharSequence s, int start, int count, int after)
{
// Log.d("seachScreen", "beforeTextChanged");
}
public void onTextChanged (CharSequence s, int start, int before, int count)
{
calcNewValue();
}
};
Can anyone spot anything that would make it not work on a Tattoo ?
What is the best way of emulating it ? , I have run the emulator on 1.6 Android and 320x240px and it works.
I am stumped on this one.
I've got a problem with my app on HTC Tattoo
Basically on a input screenI use onTextChanged() on EditText elements to kick off a calculation that updates the output on the screen.
I have had a bug report from a user of a HTC Tattoo that the output does not get updated, which makes me thing the onTextChanged() isn't working for some reason ?!?!
Here is an example of one of my EditText elements
<EditText
android:layout_toRightOf="@+id/btn_id_1"
android:layout_alignTop="@+id/btn_id_1"
android:nextFocusUp="@+id/input_calc_2"
android:nextFocusDown="@+id/input_calc_2"
android:nextFocusLeft="@+id/input_calc_2"
android:nextFocusRight="@+id/input_calc_2"
android:text=""
android:hint="hint text"
android:id="@+id/input_calc_1"
android:layout_width="160sp"
android:layout_centerHorizontal="false"
android:inputType="phone"
android:maxLength="10"
android:textSize="12sp"
android:layout_height="35sp">
</EditText>
With
(EditText) edText = (EditText)findViewById(R.id.input_calc_1);
edText .addTextChangedListener(mUpdateListener);
private TextWatcher mUpdateListener= new TextWatcher()
{
public void afterTextChanged (Editable s)
{
// Log.d("seachScreen", "afterTextChanged");
}
public void beforeTextChanged (CharSequence s, int start, int count, int after)
{
// Log.d("seachScreen", "beforeTextChanged");
}
public void onTextChanged (CharSequence s, int start, int before, int count)
{
calcNewValue();
}
};
Can anyone spot anything that would make it not work on a Tattoo ?
What is the best way of emulating it ? , I have run the emulator on 1.6 Android and 320x240px and it works.
I am stumped on this one.