开发者

Listview filter is pulling up a different language on the screen

Whenever I try to type in letters to filter my listview, my emulator pulls up some chinese or japanese characters at the bottom instead of filtering out stuff. Really weird. My filter worked fine when I first programmed the activity and I haven't changed the filter at all. Here is my listview activity.

public class Browse extends ListActivity{


    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      String[] coffeeTypes = getResources().getStringArray(R.array.coffeeTypes);
      setListAdapter(new ArrayAdapter<String>(this, R.layout.listview, coffeeTypes));

      ListView mylv = getListView();
      mylv.setTextFilterEnabled(true);

      mylv.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View view,
            int position, long id) {

            Intent myIntent = new Intent(Browse.this, CoffeeTypes.class);
            myIntent.putExtra("position", position);
            startActivity(myIntent);

        }
      });
    }
}

EDIT: Here is a screencapture of what it is 开发者_StackOverflow中文版doing.

Listview filter is pulling up a different language on the screen


Your input method is set to Chinese/Japanese. Go to any edit text and long press it. A context menu with "input method" should pop up. Press that. Select "Android keyboard" from there.

I think the default input became jap/chinese with 2.2, maybe you were developing in a 2.1 device before?


When you say

My filter worked fine when I first programmed the activity and I haven't changed the filter at all.

How long ago was it that you last saw it working correctly? Are we talking hours, days, weeks, longer? Since it worked correctly when you first made it and now displays a different language my first guess is that inbetween the time you you tried it last and now somehow one of the language settings in your phone got switched to something else. Maybe poke around in there and see if anything looks incorrect. Does anything else on your phone display characters in this other language?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜