Compare commits

..

1 Commits
dev ... master

Author SHA1 Message Date
thibaud
ca9906309e Application icon changed
Removed reference to a missing icon

Application icon changed
2017-04-20 17:17:13 +02:00
5 changed files with 3 additions and 67 deletions

View File

@ -2,9 +2,6 @@ package com.example.diceroller;
import android.app.Activity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
@ -16,7 +13,7 @@ import java.util.StringTokenizer;
* Created by thibaud on 20/04/17.
*/
public class DiceActivity extends AppCompatActivity implements View.OnClickListener {
public class DiceActivity extends Activity implements View.OnClickListener {
private TextView textResult;
private int max;
@ -44,19 +41,4 @@ public class DiceActivity extends AppCompatActivity implements View.OnClickListe
int result = rand.nextInt(max) + 1;
this.textResult.setText(String.valueOf(result));
}
@Override
public boolean onCreateOptionsMenu(Menu menu){
getMenuInflater().inflate(R.menu.main_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()){
case R.id.action_back:
return true;
}
return super.onOptionsItemSelected(item);
}
}

View File

@ -3,7 +3,6 @@ package com.example.diceroller;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
@ -34,11 +33,4 @@ public class MainActivity extends AppCompatActivity {
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu){
getMenuInflater().inflate(R.menu.main_menu, menu);
return true;
}
}

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_back"
android:icon="@android:drawable/ic_menu_revert"
android:title="@string/back"
app:showAsAction="always" />
<item
android:id="@+id/action_edit"
android:title="@string/edit"
android:icon="@android:drawable/ic_menu_edit"
app:showAsAction="ifRoom"
/>
<item
android:id="@+id/action_add"
android:title="@string/add"
android:icon="@android:drawable/ic_menu_add"
app:showAsAction="ifRoom"
/>
<item
android:id="@+id/action_delete"
android:title="@string/delete"
android:icon="@android:drawable/ic_menu_delete"
app:showAsAction="never"
/>
</menu>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">DiceRoller</string>
<string name="_6_sided_dice">Dé à 6 faces</string>
<string name="_20_sided_dice">Dé à 20 faces</string>
<string name="x_sided_dice">faces</string>
<string name="x">X</string>
<string name="roll_dice">Lancer le dé !</string>
<string name="add">Ajouter</string>
<string name="delete">Supprimer</string>
<string name="edit">Éditer</string>
<string name="back">Retour</string>
</resources>

View File

@ -1,12 +1,8 @@
<resources>
<string name="app_name" translatable="false">DiceRoller</string>
<string name="app_name">DiceRoller</string>
<string name="_6_sided_dice">6-sided dice</string>
<string name="_20_sided_dice">20-sided dice</string>
<string name="x_sided_dice">sided dice</string>
<string name="x">X</string>
<string name="roll_dice">Roll dice !</string>
<string name="edit">Edit</string>
<string name="add">Add</string>
<string name="delete">Delete</string>
<string name="back">Back</string>
</resources>