【问题标题】:all switch cases are being ran所有开关盒都在运行
【发布时间】:2015-07-27 10:26:33
【问题描述】:

我正在尝试编写一个允许用户播放声音的应用程序。首先,用户选择声音的类别,然后选择该类别中的特定声音。选择声音后,用户按下按钮即可播放声音。

我有 3 个单选按钮组,第一个单选按钮组是类别选择。其他 2 个 RadioGroups 用于特定的声音。我不得不将特定的声音无线电组分成 2 个,因为这是我可以将其放入屏幕的唯一方法。 Switch 语句用于确定选择哪个类别和哪个特定声音。所有无线电组以及播放声音的按钮都在工作。

问题在于它正在播放来自多个 switch 语句的多个声音。任何有关如何解决此问题的提示将不胜感激。

public class Main extends ActionBarActivity {
    private RadioGroup category, topRow, bottomRow;
    private RadioButton animal, people, crashes, explosions, sound1, sound2, sound3, sound4, sound5, sound6;
    private Button player;
    int type;
boolean topPlayed = false;
boolean bottomPlayed = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_punkd_main);

        //UI elements
        //Radio button groups
        category = (RadioGroup) findViewById(R.id.soundType);
        topRow = (RadioGroup) findViewById(R.id.topthree);
        bottomRow = (RadioGroup) findViewById(R.id.bottomthree);
        //Radio buttons
        //group category
        animal = (RadioButton) findViewById(R.id.Animals);
        people = (RadioButton) findViewById(R.id.People);
        crashes = (RadioButton) findViewById(R.id.Crashes);
        explosions = (RadioButton) findViewById(R.id.Explosions);
        //group topRow
        sound1 = (RadioButton) findViewById(R.id.Sound1);
        sound2 = (RadioButton) findViewById(R.id.Sound2);
        sound3 = (RadioButton) findViewById(R.id.Sound3);
        //group bottomRow
        sound4 = (RadioButton) findViewById(R.id.Sound4);
        sound5 = (RadioButton) findViewById(R.id.Sound5);
        sound6 = (RadioButton) findViewById(R.id.Sound6);
        // the button
        player = (Button) findViewById(R.id.Player);

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // not needed here
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // not needed here
    }
    //select which type of sound to use, set text on hidden radio buttons, and make them visible
    public void categorySelect(View view){
        boolean checked = ((RadioButton) view).isChecked();

        switch (view.getId()){

            case R.id.Animals:
                if (checked)
                    {type = 1;
                    topRow.setVisibility(View.VISIBLE);
                    bottomRow.setVisibility(View.VISIBLE);
                sound5.setVisibility(View.VISIBLE);//some options rehide these
                sound6.setVisibility(View.VISIBLE);

                    sound1.setText("noise1");
                    sound2.setText("noise2");
                    sound3.setText("noise3");
                    sound4.setText("noise4");
                    sound5.setText("noise5");
                    sound6.setText("noise6");}
                break;

            case R.id.People:
                if (checked)
                    {type = 2;
                    topRow.setVisibility(View.VISIBLE);
                bottomRow.setVisibility(View.VISIBLE);
                sound5.setVisibility(View.VISIBLE);//some options rehide these
                sound6.setVisibility(View.VISIBLE);

                sound1.setText("noise1");
                sound2.setText("noise2");
                sound3.setText("noise3");
                sound4.setText("noise4");
                sound5.setText("noise5");
                sound6.setText("noise6");}
                break;

            case R.id.Crashes:
                if (checked)
                    {type = 3;
                    topRow.setVisibility(View.VISIBLE);
                bottomRow.setVisibility(View.VISIBLE);
                sound6.setVisibility(View.INVISIBLE);

                sound1.setText("noise1");
                sound2.setText("noise2");
                sound3.setText("noise3");
                sound4.setText("noise4");
                sound5.setText("noise5");
                sound6.setText("error");}//should not be seen in this category

                break;

            case R.id.Explosions:
                if (checked)
                    {type = 4;
                    topRow.setVisibility(View.VISIBLE);
                bottomRow.setVisibility(View.VISIBLE);
                sound5.setVisibility(View.INVISIBLE);
                sound6.setVisibility(View.INVISIBLE);

                sound1.setText("noise1");
                sound2.setText("noise2");
                sound3.setText("noise3");
                sound4.setText("noise4");
                sound5.setText("error");//should not be seen
                sound6.setText("error");}//should not be seen

                break;
        }

    }
    //used to make 2 different radioGroups work as 1
    public void soundSelect(View view){

        boolean checked = ((RadioButton) view).isChecked();

        switch (view.getId()){

            case R.id.Sound1:
             if (checked)
{topPlayed = true;
bottomPlayed = false;
                    sound1.setChecked(true);
                    sound2.setChecked(false);
                    sound3.setChecked(false);
                    sound4.setChecked(false);
                    sound5.setChecked(false);
                    sound6.setChecked(false);}
                break;

            case R.id.Sound2:
             if (checked)
{topPlayed = true;
bottomPlayed = false;
                    sound1.setChecked(false);
                    sound2.setChecked(true);
                    sound3.setChecked(false);
                    sound4.setChecked(false);
                    sound5.setChecked(false);
                    sound6.setChecked(false);}
                break;
            case R.id.Sound3:
            if (checked)
{topPlayed = true;
bottomPlayed = false;
                    sound1.setChecked(false);
                sound2.setChecked(false);
                sound3.setChecked(true);
                sound4.setChecked(false);
                sound5.setChecked(false);
                sound6.setChecked(false);}
                break;
            case R.id.Sound4:
             if (checked)
{topPlayed = false;
bottomPlayed = true;
                    sound1.setChecked(false);
                sound2.setChecked(false);
                sound3.setChecked(false);
                sound4.setChecked(true);
                sound5.setChecked(false);
                sound6.setChecked(false);}
                break;
            case R.id.Sound5:
            if (checked)
{topPlayed = false;
bottomPlayed = true;
                sound1.setChecked(false);
                sound2.setChecked(false);
                sound3.setChecked(false);
                sound4.setChecked(false);
                sound5.setChecked(true);
                sound6.setChecked(false);}
                break;
            case R.id.Sound6:
             if (checked)
{topPlayed = false;
bottomPlayed = true;
                 sound1.setChecked(false);
                 sound2.setChecked(false);
                 sound3.setChecked(false);
                 sound4.setChecked(false);
                 sound5.setChecked(false);
                 sound6.setChecked(true);}
                break;
        }

    }

    public void playSound (View view){
        String msg;

        /* Was used to test if the type variable was setting right. commented out cause it works- delete before going live
        String msg2 = type;
        Toast.makeText(getApplicationContext(), msg2, Toast.LENGTH_LONG).show();*/


        switch (type){
            case 1:
                switch (topRow.getCheckedRadioButtonId()) {

                    case R.id.Sound1:

if (topPlayed){msg = "animal first sound";
                            Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                            mp.start();}
                        break;

                    case R.id.Sound2:
if (topPlayed)
                        {msg = "animal second sound";
                            Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                            mp2.start();}
                        break;

                    case R.id.Sound3:
if (topPlayed)
                        {msg = "animal third sound";
                            Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                            mp3.start();}
                        break;
                }
                    switch (bottomRow.getCheckedRadioButtonId()){

                    case R.id.Sound4:
if (bottomPlayed)
                        {msg = "animal fourth sound";
                            Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                            mp.start();}
                        break;

                    case R.id.Sound5:
if (bottomPlayed)
                        {msg = "animal fifth sound";
                            Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                            mp2.start();}
                        break;

                    case R.id.Sound6:
if (bottomPlayed)
                        {msg = "animal sixth sound";
                            Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                            mp3.start();}
                        break;
                }

            case 2:
                switch (topRow.getCheckedRadioButtonId()){

                    case R.id.Sound1:
                    msg = "person first sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                        MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                        mp.start();
                        break;

                    case R.id.Sound2:
                        msg = "person second sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                        mp2.start();
                        break;

                    case R.id.Sound3:
                        msg = "person third sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                     MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                        mp3.start();
                        break;
                }

                switch (bottomRow.getCheckedRadioButtonId()){
                    case R.id.Sound4:
                        msg = "person fourth sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                        mp.start();
                        break;

                    case R.id.Sound5:
                        msg = "person fifth sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                        mp2.start();
                        break;

                    case R.id.Sound6:
                        msg = "person sixth sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                        mp3.start();
                        break;
                }

            case 3:
                switch (topRow.getCheckedRadioButtonId()) {

                    case R.id.Sound1:
                    msg = "crash first sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                        MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                        mp.start();
                        break;

                    case R.id.Sound2:
                        msg = "crash second sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                        mp2.start();
                        break;

                    case R.id.Sound3:
                        msg = "crash third sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                        mp3.start();
                        break;
                }

                switch (bottomRow.getCheckedRadioButtonId()){

                    case R.id.Sound4:
                        msg = "crash fourth sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                        mp.start();
                        break;

                    case R.id.Sound5:
                        msg = "crash fifth sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                        mp2.start();
                        break;

                    case R.id.Sound6:
                        msg = "should not see this option";
                        Toast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();

                        break;

                }

            case 4:
                switch (topRow.getCheckedRadioButtonId()) {

                    case R.id.Sound1:
                    msg = "explode first sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                        MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                        mp.start();
                        break;

                    case R.id.Sound2:
                        msg = "explode second sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    {MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                        mp2.start();
                        break;

                    case R.id.Sound3:
                        msg = "explode third sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                        mp3.start();
                        break;
                }
                switch (bottomRow.getCheckedRadioButtonId()){

                    case R.id.Sound4:
                        msg = "explode fourth sound";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                    MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                        mp.start();

                        break;

                    case R.id.Sound5:
                        msg = "should not see this option";
                        Toast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();
                        break;

                    case R.id.Sound6:
                        msg = "should not see this option";
                        Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                        break;
                }
        }
    }

}

更新: 我根据给出的所有答案进行了更改。我只在这篇文章中更新了case1:in playSound(),在应用程序中,每个案例都得到了更新,应用程序现在按预期运行。感谢您的帮助!

【问题讨论】:

    标签: android switch-statement


    【解决方案1】:

    您收到多个声音的原因是您在playSound() 方法中的外部级别switch 中没有break 语句。

    您在内部级别 switch 语句上有 break 语句,但您需要在紧接之前添加它们

    case 2:
    

    case 3: 和案例 4:`.

    我也不确定您的 if 语句是否按您期望的方式工作。您的代码缩进显示了您的位置:

    if (checked)
        sound1.setChecked(true);
        sound2.setChecked(false);
        sound3.setChecked(false);
        sound4.setChecked(false);
        sound5.setChecked(false);
        sound6.setChecked(false);
    

    您希望仅当checked 为真时才调用所有setChecked 方法,但实际上它只会在checked 为真时设置sound1.setChecked(true); 并且将设置所有其他方法而不管值如何的checked。这是因为if 仅适用于下一行。如果您希望它不仅仅应用于下一行,则需要使用花括号{} 来标识if 应用到的块。因此,如果您希望它仅在 checked 为真时设置所有这些,则需要将其更改为:

    if (checked) {
        sound1.setChecked(true);
        sound2.setChecked(false);
        sound3.setChecked(false);
        sound4.setChecked(false);
        sound5.setChecked(false);
        sound6.setChecked(false);
    }
    

    更新

    我刚刚注意到您在外部 switch 语句中的每个 case 中还有两个 switch 语句,因此您可能还需要一个标志或其他东西来检查您是否播放了来自第一个广播组的声音并且只运行第二个switch 声明,如果你没有。

    【讨论】:

    • 将此标记为答案,因为提出的每一点都需要完成。我还编辑了我的代码以反映根据提供的答案所做的更改。感谢您的帮助!
    【解决方案2】:

    这是java,你不能单独通过缩进来标记块。 因此,在 if 块周围放置花括号通常是个好主意,例如:

    改变

    if (checked)
                    sound1.setChecked(true);
                    sound2.setChecked(false);
                    sound3.setChecked(false);
                    sound4.setChecked(false);
                    sound5.setChecked(false);
                    sound6.setChecked(false);
    

    if (checked) {
                    sound1.setChecked(true);
                    sound2.setChecked(false);
                    sound3.setChecked(false);
                    sound4.setChecked(false);
                    sound5.setChecked(false);
                    sound6.setChecked(false);
    }
    

    另一个相应的,那么它应该可以工作。

    【讨论】:

      【解决方案3】:

      您在RadioGroup 中检查RadiButton 的方式是否已检查您正在执行的方式。应按如下方式进行:

      if(gender.getCheckedRadioButtonId()==-1)
      {
          Toast.makeText(getApplicationContext(), "Please select Gender", Toast.LENGTH_SHORT).show();
      }
      else
      {
          // get selected radio button from radioGroup
          int selectedId = gender.getCheckedRadioButtonId();
          // find the radiobutton by returned id
          selectedRadioButton = (RadioButton)findViewById(selectedId);
          Toast.makeText(getApplicationContext(), selectedRadioButton.getText().toString()+" is selected", Toast.LENGTH_SHORT).show();
      }
      

      【讨论】:

        【解决方案4】:

        您的 public void playSound (View view){} 包含 switch 语句,即 switch (type){ case 1:} 此 switch 语句案例不包含导致播放多个声音的 break; 语句。将您的方法更改为如下所示,您的代码将像魅力一样工作。

        public void playSound (View view){
                String msg;
        
                /* Was used to test if the type variable was setting right. commented out cause it works- delete before going live
                String msg2 = type;
                Toast.makeText(getApplicationContext(), msg2, Toast.LENGTH_LONG).show();*/
        
        
                switch (type){
                    case 1:
                        switch (topRow.getCheckedRadioButtonId()) {
        
                            case R.id.Sound1:
                             msg = "animal first sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                                mp.start();
                                break;
        
                            case R.id.Sound2:
                            msg = "animal second sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                                mp2.start();
                                break;
        
                            case R.id.Sound3:
                            msg = "animal third sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                                mp3.start();
                                break;
                        }
                            switch (bottomRow.getCheckedRadioButtonId()){
        
                            case R.id.Sound4:
                            msg = "animal fourth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                                mp.start();
                                break;
        
                            case R.id.Sound5:
                            msg = "animal fifth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                                mp2.start();
                                break;
        
                            case R.id.Sound6:
                            msg = "animal sixth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                                mp3.start();
                                break;
                        }
                      break;
                    case 2:
                        switch (topRow.getCheckedRadioButtonId()){
        
                            case R.id.Sound1:
                            msg = "person first sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                                mp.start();
                                break;
        
                            case R.id.Sound2:
                                msg = "person second sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                                mp2.start();
                                break;
        
                            case R.id.Sound3:
                                msg = "person third sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                             MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                                mp3.start();
                                break;
                        }
        
                        switch (bottomRow.getCheckedRadioButtonId()){
                            case R.id.Sound4:
                                msg = "person fourth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                                mp.start();
                                break;
        
                            case R.id.Sound5:
                                msg = "person fifth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                                mp2.start();
                                break;
        
                            case R.id.Sound6:
                                msg = "person sixth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                                mp3.start();
                                break;
                        }
                    break;
                    case 3:
                        switch (topRow.getCheckedRadioButtonId()) {
        
                            case R.id.Sound1:
                            msg = "crash first sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                                mp.start();
                                break;
        
                            case R.id.Sound2:
                                msg = "crash second sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                                mp2.start();
                                break;
        
                            case R.id.Sound3:
                                msg = "crash third sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                                mp3.start();
                                break;
                        }
        
                        switch (bottomRow.getCheckedRadioButtonId()){
        
                            case R.id.Sound4:
                                msg = "crash fourth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                                mp.start();
                                break;
        
                            case R.id.Sound5:
                                msg = "crash fifth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                                mp2.start();
                                break;
        
                            case R.id.Sound6:
                                msg = "should not see this option";
                                Toast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();
        
                                break;
        
                        }
                   break;
                    case 4:
                        switch (topRow.getCheckedRadioButtonId()) {
        
                            case R.id.Sound1:
                            msg = "explode first sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                                mp.start();
                                break;
        
                            case R.id.Sound2:
                                msg = "explode second sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            {MediaPlayer mp2 = MediaPlayer.create(this, R.raw.sound);
                                mp2.start();
                                break;
        
                            case R.id.Sound3:
                                msg = "explode third sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp3 = MediaPlayer.create(this, R.raw.sound);
                                mp3.start();
                                break;
                        }
                        switch (bottomRow.getCheckedRadioButtonId()){
        
                            case R.id.Sound4:
                                msg = "explode fourth sound";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                            MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);
                                mp.start();
        
                                break;
        
                            case R.id.Sound5:
                                msg = "should not see this option";
                                Toast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();
                                break;
        
                            case R.id.Sound6:
                                msg = "should not see this option";
                                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
                                break;
                        }
                   break;
                }
            }
        

        【讨论】:

          猜你喜欢
          • 2020-04-08
          • 2021-12-28
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2011-07-30
          • 1970-01-01
          • 2016-07-07
          相关资源
          最近更新 更多