Enable a currently disabled Spinner in Android

前端 未结 2 1164
执笔经年
执笔经年 2021-01-24 15:43

I was fooling around with Android and my Java knowledge is limited at best (for instance, I\'m perplexed by the fact that it allows inline classes!?).

My question is as

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-24 16:08

    Try to use this :

        switch(parent.getId())
        {
        case R.id.spinner1:
            Log.d(TAG,"spinner1");
            break;
        case R.id.spinner2:
            Log.d(TAG,"spinner2");
             break;
    
        }
    

    good luck !

提交回复
热议问题