Commit ac0d4ba2 authored by Mathilde Ballouhey's avatar Mathilde Ballouhey
Browse files

maj: Ajout du onClick generateName()

parent 16eb950b
Pipeline #29125 failed with stages
in 1 minute and 21 seconds
......@@ -31,7 +31,7 @@ public class DisplayResultActivity extends AppCompatActivity {
lbl_displayResult_saves, lbl_displayResult_str, lbl_displayResult_dex,
lbl_displayResult_int, lbl_displayResult_con, lbl_displayResult_wis,
lbl_displayResult_cha, lbl_displayResult_equipements, lbl_displayResult_hp, lbl_displayResult_languages;
private ImageView img_displayResult_gif;
private ImageView img_displayResult_gif, img_displayResult_reloadName;
private FloatingActionButton btn_displayResult_favourite;
@Override
......@@ -55,6 +55,7 @@ public class DisplayResultActivity extends AppCompatActivity {
lbl_displayResult_cha = findViewById(R.id.lbl_displayResult_cha);
lbl_displayResult_equipements = findViewById(R.id.lbl_displayResult_equipements);
img_displayResult_gif = findViewById(R.id.img_displayResult_gif);
img_displayResult_reloadName = findViewById(R.id.img_displayResult_reloadName);
btn_displayResult_favourite = findViewById(R.id.btn_displayResult_favourite);
lbl_displayResult_hp = findViewById(R.id.lbl_displayResult_hp);
lbl_displayResult_languages = findViewById(R.id.lbl_displayResult_languages);
......@@ -138,6 +139,16 @@ public class DisplayResultActivity extends AppCompatActivity {
setFavouriteBtn();
}
});
img_displayResult_reloadName.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
img_displayResult_reloadName.setEnabled(false);
m_sheet.generateName(DisplayResultActivity.this);
lbl_displayResult_name.setText(m_sheet.getName());
img_displayResult_reloadName.setEnabled(true);
}
});
}
private void setFavouriteBtn() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment