0

나는 4 개의 회 전자 (A, B, C, D)를 가진 안드로이드를 개발 중이다. 회 전자 A는 내가 나머지 스피너가 자동으로안드로이드의 자동 회선 선택

등의 값에 따라 그 값을 변경하고자하는 값으로 설정되면 내가 (A)에 영화를 설정하면 내가 달성하고자하는 입니다 ---> 티켓 (C에서) ----> 장소 (B)에 ----> (D) 시간이 자동으로 입력합니다.

당신에게 ChinniKrishna Kothapalli

답변

1

하라구요 나는 당신에 OnItemSelectedListener를 설정할 수 있다고 생각하여 영화 회 전자. Spinner tutorial은 적절한 예입니다. 귀하의 OnItemSelectedListener는 다음과 같이 할 수있다 :

public class MyOnItemSelectedListener implements OnItemSelectedListener { 

    public void onItemSelected(AdapterView<?> parent, 
     View view, int pos, long id) { 
     if (parent.getItemAtPosition(pos).toString().equals("firstMovieName")) { 
      // set spinner B/C/D with the corresponding information of first movie 
     } 
    } 

    public void onNothingSelected(AdapterView parent) { 
     // Do nothing. 
    } 
} 

위의 onItemSelected 방법은 당신의 필요를 위해 너무 간단 할 수 있습니다. 네 개의 스피너를 직접 연결하는 방법을 알아 내야하지만, 도움이 될 수 있습니다.