Strange Spinner. How to fix it?

后端 未结 4 1385
离开以前
离开以前 2021-01-28 02:18

This is my code to populate the Spinner. It looks strange and ugly.

    @Override
    protected void onPostExecute(final List result) {
        Sys         


        
4条回答
  •  长发绾君心
    2021-01-28 02:44

    TRY THIS

    @Override
        protected void onPostExecute(final List result) {
            System.out.println("Result: " + result);
        final String[] test = new String[] { "test1", "test2" };
    
        ArrayAdapter adapter = new ArrayAdapter(this,
                    android.R.layout.simple_dropdown_item_1line, test);
        countrySpinner.setAdapter(adapter);
    }
    and xml as::
    
    
    

提交回复
热议问题