Commit 44b2206e authored by Martin LOISEAU's avatar Martin LOISEAU 🎄
Browse files

Display button description when clicked

parent ac2eb28d
......@@ -18,14 +18,45 @@ public class MainActivity extends AppCompatActivity {
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
/*FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
FloatingActionButton photo = findViewById(R.id.photo);
// Should open camera to take a picture of a QR code
photo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
Snackbar.make(view, "Should open QR code reader", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});*/
});
FloatingActionButton synthese = findViewById(R.id.vocal_reader);
// Should read some text out loud using speech synthesis
synthese.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Should read some text out loud using speech synthesis", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
FloatingActionButton listening = findViewById(R.id.vocal_listener);
// Should listen to what's being said using speech recognition API
listening.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Should listen to what's being said using speech recognition API", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
FloatingActionButton mp3_reader = findViewById(R.id.mp3_reader);
// Should play sound from an mp3 file
mp3_reader.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Should play sound from an mp3 file", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
}
@Override
......
Supports Markdown
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