Сокрытие и скрытие рядов

В первой операции:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if(requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK){
        Intent showImageIntent = new Intent(this, ShowCameraPicture.class);
        showImageIntent.fillIn(data,Intent.FILL_IN_DATA);
        startActivity(showImageIntent);
    }
}

Во второй операции:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle bundle = getIntent().getExtras();
    if(bundle!=null){
        Bitmap image = (Bitmap)bundle.get("data");
        //do whatever you need to do with the bitmap here ...
    }       
}       
0
задан user7202022 26 February 2019 в 12:39
поделиться

1 ответ

Кажется, вместо counter2 = (counter2 + 1) Mod 5 вы хотите сделать counter2 = (counter2 Mod 4) + 1

Если вы определите число по модулю 5, ожидается, что оно сгенерирует 5 шагов.
Установка переменной по модулю 4, а затем добавление 1 к ней сделает цикл от 1 до 4.

0
ответ дан FXD 26 February 2019 в 12:39
поделиться
Другие вопросы по тегам:

Похожие вопросы: