Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import android.view.View;
import android.os.Vibrator;

import com.nicue.onetwo.R;
import com.nicue.onetwo.Utils.Pools.SimplePool;

import java.util.Arrays;
Expand Down Expand Up @@ -368,10 +369,10 @@ protected void drawCircle(Canvas canvas, int id, TouchHistory data) {
canvas.drawCircle(data.x, (data.y) - half_r, radius + 90,
mTransStrokePaint);
if ((data.x + radius + 50)<mScreenWidth ) {
canvas.drawText("Chosen", data.x + radius, data.y
canvas.drawText(getContext().getString(R.string.chosen), data.x + radius, data.y
- radius, mTextPaint);
}else{
canvas.drawText("Chosen", data.x - radius -100, data.y
canvas.drawText(getContext().getString(R.string.chosen), data.x - radius -100, data.y
- radius - 90, mTextPaint);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void fabClick(View view) {
final EditText etNumber = (EditText) alertView.findViewById(R.id.et_number);
AlertDialog dialog = new AlertDialog.Builder(getActivity())
.setView(alertView)
.setPositiveButton("Add", new DialogInterface.OnClickListener() {
.setPositiveButton(getString(R.string.add), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
String object_dirty = etToCount.getText().toString();
Expand Down Expand Up @@ -167,7 +167,7 @@ public void onClick(DialogInterface dialog, int which) {

}
})
.setNegativeButton("Cancel", null)
.setNegativeButton(getString(R.string.cancel), null)
.create();
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN | WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
dialog.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public void fabDiceClick(View view) {
//et_dice.setRawInputType(InputType.TYPE_CLASS_NUMBER |InputType.TYPE_NUMBER_FLAG_DECIMAL);
AlertDialog dialog = new AlertDialog.Builder(getActivity())
.setView(alertView)
.setTitle("Dice\'s Faces:")
.setPositiveButton("Add", new DialogInterface.OnClickListener() {
.setTitle(getString(R.string.dice_title))
.setPositiveButton(getString(R.string.add), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

Expand All @@ -155,7 +155,7 @@ public void onClick(DialogInterface dialog, int which) {

}
})
.setNegativeButton("Cancel", null)
.setNegativeButton(getString(R.string.cancel), null)
.create();
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN | WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
dialog.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ public String format(int index) {
});
AlertDialog dialog = new AlertDialog.Builder(getActivity())
.setView(alertView)
.setTitle("Set Time:")
.setPositiveButton("Set", new DialogInterface.OnClickListener() {
.setTitle(getString(R.string.timer_dialog_message))
.setPositiveButton(getString(R.string.timer_dialog_set), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setMiliSeconds = npMinutes.getValue() * 60 + npSeconds.getValue();
Expand All @@ -229,7 +229,7 @@ public void onClick(DialogInterface dialog, int which) {

}
})
.setNegativeButton("Cancel", null)
.setNegativeButton(getString(R.string.cancel), null)
.create();
dialog.show();
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/dice_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Roll"
android:text="@string/roll"
android:id="@+id/throw_button"
android:layout_toEndOf="@+id/imageView_dice"
android:layout_centerVertical="true"/>
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>

</LinearLayout>
</LinearLayout>
36 changes: 36 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<resources>
<string name="app_name">OneTwo</string>
<string name="instruction">Knopf drücken um Zähler hinzuzufügen</string>
<string name="add_counter">Zähler hinzufügen</string>
<string name="alert_tv_object">Wer spielt?</string>
<string name="alert_tv_number">Leben/Punkte: </string>
<string name="menu_counter">Zähler</string>
<string name="menu_dice">Würfel</string>
<string name="menu_chooser">Wählen</string>
<string name="menu_timer">Timer</string>
<string name="menu_counter_space">&#160;Zähler</string>
<string name="menu_dice_space">&#160;Würfel</string>
<string name="menu_chooser_space">&#160;Wählen</string>
<string name="menu_timer_space">&#160;Timer</string>
<string name="drawer_open">Menü öffnen</string>
<string name="drawer_close">Menü schließen</string>
<string name="nav_header">OneTwo</string>
<string name="dice_title">Würfelseiten</string>
<string name="touch_me">Jeder legt einen Finger auf, dann wird einer ausgewählt</string>
<string name="edit">Bearbeiten</string>
<string name="roll">Würfeln</string>
<string name="roll_all">Alle würfeln</string>
<string name="add_timer">Hinzufügen </string>
<string name="remove_timer">Entfernen</string>
<string name="space"> </string>
<string name="order">Reihenfolge</string>
<string name="play">Start</string>
<string name="pause">Pause</string>
<string name="counter_instruction">Knopf drücken um Zähler hinzuzufügen oder nach rechts wischen für mehr Optionen</string>
<string name="add">Hinzufügen</string>
<string name="cancel">Abbrechen</string>
<string name="timer_dialog_message">Zeit einstellen:</string>
<string name="timer_dialog_set">Setzen</string>
<string name="chosen">Gewählt</string>

</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<string name="dice_title">Dice\'s faces</string>
<string name="touch_me">Place a finger each to choose among you</string>
<string name="edit">Edit</string>
<string name="roll">Roll</string>
<string name="roll_all">Roll All</string>
<string name="add_timer">Add </string>
<string name="remove_timer">Remove</string>
Expand All @@ -26,5 +27,10 @@
<string name="play">Play</string>
<string name="pause">Pause</string>
<string name="counter_instruction">Press the button to add a counter or swipe right for more options</string>
<string name="add">Add</string>
<string name="cancel">Cancel</string>
<string name="timer_dialog_message">Set Time:</string>
<string name="timer_dialog_set">Set</string>
<string name="chosen">Chosen</string>

</resources>