2019-pracownia-programowani.../Lookify/app/src/main/java/com/example/lookifyv2/DecodeFail.java

51 lines
1.4 KiB
Java
Raw Normal View History

package com.example.lookifyv2;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class DecodeFail extends AppCompatActivity {
private Button button_tryagain;
private Button button_backtomain;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_decode_fail);
button_tryagain = findViewById(R.id.try_again_button);
button_tryagain.getBackground().setColorFilter(0xFF67BAFF, PorterDuff.Mode.MULTIPLY);
button_backtomain = findViewById(R.id.backto_main_button);
button_backtomain.getBackground().setColorFilter(0xFF67BAFF, PorterDuff.Mode.MULTIPLY);
button_tryagain.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openScan();
}
});
button_backtomain.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Finish();
}
});
}
public void Finish(){
finish();
}
public void openScan(){
Intent intent_Scan = new Intent(this, TakePhoto.class);
startActivity(intent_Scan);
finish();
}
}