Commit 586a431a authored by Kevin Whitaker's avatar Kevin Whitaker
Browse files

Remove temp migration and bump version for next release. Remove hard coded...

Remove temp migration and bump version for next release. Remove hard coded english text from code and put into resources. Add in official realm migrator due to old version no longer supported.
parent 7c9fae25
MiceandMysticsCampaignTracker
\ No newline at end of file
MiceAndMysticsTracker
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
</value>
</option>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
</component>
</project>
\ No newline at end of file
......@@ -3,9 +3,10 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.7" />
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.8" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
......
......@@ -3,8 +3,29 @@
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
......@@ -16,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -2,8 +2,8 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/MiceAndMysticsTracker/MiceAndMysticsTracker.iml" filepath="$PROJECT_DIR$/MiceAndMysticsTracker/MiceAndMysticsTracker.iml" />
<module fileurl="file://$PROJECT_DIR$/MiceandMysticsCampaignTracker.iml" filepath="$PROJECT_DIR$/MiceandMysticsCampaignTracker.iml" />
<module fileurl="file://$PROJECT_DIR$/MiceAndMysticsTracker.iml" filepath="$PROJECT_DIR$/MiceAndMysticsTracker.iml" />
<module fileurl="file://$PROJECT_DIR$/MiceAndMysticsTracker/MiceAndMysticsTracker-MiceAndMysticsTracker.iml" filepath="$PROJECT_DIR$/MiceAndMysticsTracker/MiceAndMysticsTracker-MiceAndMysticsTracker.iml" />
</modules>
</component>
</project>
\ No newline at end of file
......@@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.1'
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
apply plugin: 'com.android.application'
......@@ -20,8 +20,8 @@ android {
applicationId "com.eyecreate.miceandmystics.miceandmystics"
minSdkVersion 16
targetSdkVersion 21
versionCode 3
versionName "1.0.2"
versionCode 4
versionName "1.0.3"
}
compileOptions {
......@@ -39,7 +39,7 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'io.realm:realm-android:0.80.1'
compile 'io.realm:realm-android:0.87.0'
compile 'uk.co.chrisjenx:calligraphy:2.0.2'
compile 'com.android.support:recyclerview-v7:21.0.+'
compile 'com.android.support:cardview-v7:21.0.+'
......
......@@ -22,7 +22,7 @@ public class CampaignActivity extends RecyclerViewActivity {
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setIcon(R.mipmap.ic_launcher);
setTitle("Campaigns");
setTitle(getString(R.string.campaign_activity));
setLayoutManager(new LinearLayoutManager(this));
setAdapter(new CampaignAdapter());
}
......@@ -57,15 +57,15 @@ public class CampaignActivity extends RecyclerViewActivity {
typeSpinner.setAdapter(new ArrayAdapter<CampaignType>(this, R.layout.simple_spinner_item, CampaignType.values()));
typeSpinner.setSelection(0);
AlertDialog addDialog = new AlertDialogPro.Builder(this,R.style.dialogTheme)
.setMessage("Please give your new campaign a unique name:")
.setMessage(getString(R.string.campaign_name_request))
.setView(dialogView)
.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
.setPositiveButton(getString(R.string.dialog_confirm), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if(((EditText) dialogView.findViewById(R.id.campaign_name)).getText().length()>0) {
((CampaignAdapter) getAdapter()).addItem(((EditText) dialogView.findViewById(R.id.campaign_name)).getText().toString(), CampaignType.valueOf(((CampaignType)typeSpinner.getSelectedItem()).name()));
if (((EditText) dialogView.findViewById(R.id.campaign_name)).getText().length() > 0) {
((CampaignAdapter) getAdapter()).addItem(((EditText) dialogView.findViewById(R.id.campaign_name)).getText().toString(), CampaignType.valueOf(((CampaignType) typeSpinner.getSelectedItem()).name()));
} else {
Toast.makeText(CampaignActivity.this,"Can not have blank name!",Toast.LENGTH_LONG).show();
Toast.makeText(CampaignActivity.this, R.string.campaign_name_blank, Toast.LENGTH_LONG).show();
}
}
})
......
......@@ -35,7 +35,7 @@ public class CampaignDetailsActivity extends RecyclerViewActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle("Game Details");
setTitle(getString(R.string.campaign_details_Activity));
if(getIntent().hasExtra("campaignName")) {
campaign = MiceAndMysticsApplication.getRealmInstance().where(Campaign.class).equalTo("campaignName",getIntent().getStringExtra("campaignName")).findFirst();
} else if(savedInstanceState.containsKey("campaignName")) {
......@@ -89,9 +89,9 @@ public class CampaignDetailsActivity extends RecyclerViewActivity {
final View dialogView = inflator.inflate(R.layout.dialog_new_player, null, false);
final EditText playerEdit = ((EditText)dialogView.findViewById(R.id.player_name));
AlertDialog addDialog = new AlertDialogPro.Builder(ctx,R.style.dialogTheme)
.setMessage("Please name the new player:")
.setMessage(ctx.getString(R.string.player_name_request))
.setView(dialogView)
.setPositiveButton("Create", new DialogInterface.OnClickListener() {
.setPositiveButton(ctx.getString(R.string.dialog_create), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
RealmResults<Player> matchingPlayers = MiceAndMysticsApplication.getRealmInstance().where(Player.class).equalTo("playerName", playerEdit.getText().toString()).findAll();
......@@ -102,9 +102,9 @@ public class CampaignDetailsActivity extends RecyclerViewActivity {
MiceAndMysticsApplication.getRealmInstance().copyToRealmOrUpdate(player);
MiceAndMysticsApplication.getRealmInstance().commitTransaction();
} else if (playerEdit.getText().length() == 0) {
Toast.makeText(ctx, "Can not have a blank name!", Toast.LENGTH_LONG).show();
Toast.makeText(ctx, R.string.player_name_blank, Toast.LENGTH_LONG).show();
} else if (matchingPlayers.size() > 0) {
Toast.makeText(ctx, "Can not have same name as another player!", Toast.LENGTH_LONG).show();
Toast.makeText(ctx, R.string.player_name_dup, Toast.LENGTH_LONG).show();
}
}
})
......@@ -125,22 +125,22 @@ public class CampaignDetailsActivity extends RecyclerViewActivity {
achievementSpinner.setAdapter(new ArrayAdapter<com.eyecreate.miceandmystics.miceandmystics.model.Enums.Achievement>(this, R.layout.simple_spinner_item, com.eyecreate.miceandmystics.miceandmystics.model.Enums.Achievement.values()));
achievementSpinner.setSelection(0);
AlertDialog addDialog = new AlertDialogPro.Builder(this,R.style.dialogTheme)
.setMessage("Please select the achievement to add to party:")
.setMessage(getString(R.string.achievement_add_request))
.setView(dialogView)
.setPositiveButton("Add", new DialogInterface.OnClickListener() {
.setPositiveButton(getString(R.string.dialog_add), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
RealmList<Achievement> currentPartyAchievements = MiceAndMysticsApplication.getRealmInstance().where(Campaign.class).equalTo("campaignName",campaign.getCampaignName()).findFirst().getPartyStoryAchievements();
RealmList<Achievement> currentPartyAchievements = MiceAndMysticsApplication.getRealmInstance().where(Campaign.class).equalTo("campaignName", campaign.getCampaignName()).findFirst().getPartyStoryAchievements();
boolean hasAlready = false;
for (Achievement achievement:currentPartyAchievements) {
if(((com.eyecreate.miceandmystics.miceandmystics.model.Enums.Achievement)achievementSpinner.getSelectedItem()).name().equals(achievement.getAchievementName())){
for (Achievement achievement : currentPartyAchievements) {
if (((com.eyecreate.miceandmystics.miceandmystics.model.Enums.Achievement) achievementSpinner.getSelectedItem()).name().equals(achievement.getAchievementName())) {
hasAlready = true;
}
}
if (!hasAlready) {
((CampaignDetailsAdapter) getAdapter()).addPartyAchievement((com.eyecreate.miceandmystics.miceandmystics.model.Enums.Achievement) achievementSpinner.getSelectedItem());
} else {
Toast.makeText(CampaignDetailsActivity.this, "Can not have more than one of same achievement.", Toast.LENGTH_LONG).show();
Toast.makeText(CampaignDetailsActivity.this, R.string.achievement_dup, Toast.LENGTH_LONG).show();
}
}
})
......@@ -159,15 +159,15 @@ public class CampaignDetailsActivity extends RecyclerViewActivity {
playerSpinner.setAdapter(new ArrayAdapter<String>(this, R.layout.simple_spinner_item, Player.convertPlayerListToStringArray(players.subList(0,players.size()))));
playerSpinner.setSelection(0);
AlertDialog addDialog = new AlertDialogPro.Builder(this,R.style.dialogTheme)
.setMessage("Please select your character and controlling player:")
.setMessage(getString(R.string.character_add_request))
.setView(dialogView)
.setPositiveButton("Create", new DialogInterface.OnClickListener() {
.setPositiveButton(getString(R.string.dialog_create), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if(playerSpinner.getSelectedItem() != null) {
((CampaignDetailsAdapter) getAdapter()).addCharacter(((CharacterNames)charSpinner.getSelectedItem()), MiceAndMysticsApplication.getRealmInstance().where(Player.class).equalTo("playerName", playerSpinner.getSelectedItem().toString()).findFirst());
} else {
Toast.makeText(CampaignDetailsActivity.this,"No player selected. Maybe try making one first.",Toast.LENGTH_LONG).show();
Toast.makeText(CampaignDetailsActivity.this, R.string.character_player_blank,Toast.LENGTH_LONG).show();
}
}
})
......
......@@ -25,7 +25,7 @@ public class CharacterDetailsActivity extends RecyclerViewActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle("Character Details");
setTitle(getString(R.string.character_activity));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if(getIntent().hasExtra("characterId")) {
currentCharacter = MiceAndMysticsApplication.getRealmInstance().where(Character.class).equalTo("uuid",getIntent().getStringExtra("characterId")).findFirst();
......@@ -71,16 +71,16 @@ public class CharacterDetailsActivity extends RecyclerViewActivity {
abilitySpinner.setAdapter(new ArrayAdapter<Abilities>(this, R.layout.simple_spinner_item, Abilities.getMatchingCharacterAbilities(CharacterNames.valueOf(currentCharacter.getCharacterName()).characterTypes())));
abilitySpinner.setSelection(0);
AlertDialog addDialog = new AlertDialogPro.Builder(this,R.style.dialogTheme)
.setMessage("Please select the ability to be added:")
.setMessage(getString(R.string.character_ability_request))
.setView(dialogView)
.setPositiveButton("Add", new DialogInterface.OnClickListener() {
.setPositiveButton(getString(R.string.dialog_add), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
RealmResults<Character> duplicates = MiceAndMysticsApplication.getRealmInstance().where(Character.class).equalTo("abilities.abilityName", ((Abilities) abilitySpinner.getSelectedItem()).name()).equalTo("uuid", currentCharacter.getUuid()).findAll();
if(duplicates.size()==0) {
if (duplicates.size() == 0) {
((CharacterDetailsAdapter) getAdapter()).addAbility((Abilities) abilitySpinner.getSelectedItem());
} else {
Toast.makeText(CharacterDetailsActivity.this,"That ability is already on this character.",Toast.LENGTH_LONG).show();
Toast.makeText(CharacterDetailsActivity.this, R.string.character_ability_exists, Toast.LENGTH_LONG).show();
}
}
})
......@@ -93,15 +93,15 @@ public class CharacterDetailsActivity extends RecyclerViewActivity {
final View dialogView = inflator.inflate(R.layout.dialog_new_item, null, false);
final EditText itemEdit = ((EditText)dialogView.findViewById(R.id.item_name));
AlertDialog addDialog = new AlertDialogPro.Builder(this,R.style.dialogTheme)
.setMessage("Please name the item to mark as held:")
.setMessage(getString(R.string.character_item_request))
.setView(dialogView)
.setPositiveButton("Add", new DialogInterface.OnClickListener() {
.setPositiveButton(getString(R.string.dialog_add), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (itemEdit.getText().length() > 0) {
((CharacterDetailsAdapter) getAdapter()).addItem(itemEdit.getText().toString());
} else if (itemEdit.getText().length() == 0) {
Toast.makeText(CharacterDetailsActivity.this, "Can not have a blank item name!", Toast.LENGTH_LONG).show();
Toast.makeText(CharacterDetailsActivity.this, R.string.character_item_blank, Toast.LENGTH_LONG).show();
}
}
})
......
......@@ -10,6 +10,7 @@ import com.eyecreate.miceandmystics.miceandmystics.model.Enums.CampaignType;
import com.eyecreate.miceandmystics.miceandmystics.model.Enums.CharacterNames;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import io.realm.RealmResults;
import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
......@@ -17,18 +18,20 @@ public class MiceAndMysticsApplication extends Application {
private static MiceAndMysticsApplication singletonApplication;
private static Realm singletonRealm;
private RealmConfiguration realmConfig;
@Override
public void onCreate() {
super.onCreate();
singletonApplication = this;
singletonRealm = Realm.getInstance(this);
realmConfig = new RealmConfiguration.Builder(this).schemaVersion(1).migration(new RealmMigrator()).build();
singletonRealm = Realm.getInstance(realmConfig);
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("ArchitectsDaughter.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
.setDefaultFontPath("ArchitectsDaughter.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
checkForPreLocalization();
//checkForPreLocalization();
}
private void checkForPreLocalization() {
......
......@@ -10,7 +10,7 @@ public class PlayerManagerActivity extends RecyclerViewActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle("Manage Players");
setTitle(getString(R.string.players_activity));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setLayoutManager(new LinearLayoutManager(this));
setAdapter(new PlayerManagerAdapter());
......
package com.eyecreate.miceandmystics.miceandmystics;
import io.realm.DynamicRealm;
import io.realm.RealmMigration;
public class RealmMigrator implements RealmMigration {
@Override
public void migrate(DynamicRealm dynamicRealm, long oldVersion, long newVersion) {
if(oldVersion == 0 && newVersion == 1) {
//Nothing
}
}
}
......@@ -76,7 +76,7 @@ public class CampaignDetailsAdapter extends RecyclerView.Adapter<RecyclerView.Vi
MiceAndMysticsApplication.getRealmInstance().commitTransaction();
fullRefresh();
} else {
Toast.makeText(inflater.getContext(),"Can not have two of same character in game.",Toast.LENGTH_LONG).show();
Toast.makeText(inflater.getContext(), R.string.character_game_dup,Toast.LENGTH_LONG).show();
}
}
......
......@@ -47,21 +47,21 @@ public class PlayerManagerAdapter extends RecyclerView.Adapter<PlayerViewHolder>
.equalTo("controllingPlayer.playerName", playerName).findAll();
if(playerCharacters.size()>0) {
AlertDialog removeDialog = new AlertDialogPro.Builder(ctx,R.style.dialogTheme)
.setMessage("Removing player "+playerName+" must first remove all characters owned by player. Do you want to continue still?")
.setNegativeButton("No", new DialogInterface.OnClickListener() {
.setMessage(ctx.getString(R.string.remove_player_confirm_1)+playerName+ctx.getString(R.string.remove_player_confirm_2))
.setNegativeButton(ctx.getString(R.string.dialog_no), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
})
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
.setPositiveButton(ctx.getString(R.string.dialog_yes), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
for(Iterator iter = playerCharacters.iterator();playerCharacters.iterator().hasNext();) {
CampaignDetailsAdapter.removeCharacterFromDB((Character)iter.next());
for (Iterator iter = playerCharacters.iterator(); playerCharacters.iterator().hasNext(); ) {
CampaignDetailsAdapter.removeCharacterFromDB((Character) iter.next());
}
MiceAndMysticsApplication.getRealmInstance().beginTransaction();
MiceAndMysticsApplication.getRealmInstance().where(Player.class).equalTo("playerName",playerName).findFirst().removeFromRealm();
MiceAndMysticsApplication.getRealmInstance().where(Player.class).equalTo("playerName", playerName).findFirst().removeFromRealm();
MiceAndMysticsApplication.getRealmInstance().commitTransaction();
notifyDataSetChanged();
}
......@@ -70,14 +70,14 @@ public class PlayerManagerAdapter extends RecyclerView.Adapter<PlayerViewHolder>
removeDialog.show();
} else {
AlertDialog removeDialog = new AlertDialogPro.Builder(ctx, R.style.dialogTheme)
.setMessage("Do you want to remove player: " + playerName + "?")
.setNegativeButton("No", new DialogInterface.OnClickListener() {
.setMessage(ctx.getString(R.string.remove_empty_player_confirm) + playerName + "?")
.setNegativeButton(ctx.getString(R.string.dialog_no), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
})
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
.setPositiveButton(ctx.getString(R.string.dialog_yes), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
MiceAndMysticsApplication.getRealmInstance().beginTransaction();
......
......@@ -2,12 +2,14 @@ package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import io.realm.annotations.Required;
import java.util.UUID;
public class Ability extends RealmObject {
@PrimaryKey
private String uuid;
@Required
private String abilityName;
public Ability() {}
......
......@@ -2,12 +2,14 @@ package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import io.realm.annotations.Required;
import java.util.UUID;
public class Achievement extends RealmObject {
@PrimaryKey
private String uuid;
@Required
private String achievementName;
public Achievement() {}
......
......@@ -2,11 +2,13 @@ package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import io.realm.annotations.Required;
public class BackpackItem extends RealmObject {
//TODO:Look into seeing if it's worth hard coding these instead of manual entry.
@PrimaryKey
private String uuid;
@Required
private String itemName;
public BackpackItem() {}
......
......@@ -3,10 +3,12 @@ package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmList;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import io.realm.annotations.Required;
public class Campaign extends RealmObject {
@PrimaryKey
private String campaignName;
@Required
private String campaignType;
private RealmList<Character> currentCharacters;
private RealmList<Achievement> partyStoryAchievements;
......
......@@ -3,10 +3,12 @@ package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmList;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import io.realm.annotations.Required;
public class Character extends RealmObject {
@PrimaryKey
private String uuid;
@Required
private String characterName;
private RealmList<Ability> abilities;
private RealmList<BackpackItem> storedItems; //Not sure why I made this a list when rulebook says you can only have one xD
......
......@@ -48,14 +48,14 @@ public class CampaignDetailsViewHolder extends RecyclerView.ViewHolder implement
@Override
public boolean onLongClick(View view) {
AlertDialog removeDialog = new AlertDialogPro.Builder(view.getContext(),R.style.dialogTheme)
.setMessage("Do you want to remove character: "+characterName.getText()+"?")
.setNegativeButton("No", new DialogInterface.OnClickListener() {
.setMessage(view.getContext().getString(R.string.remove_character_confirm)+characterName.getText()+"?")
.setNegativeButton(view.getContext().getString(R.string.dialog_no), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
})
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
.setPositiveButton(view.getContext().getString(R.string.dialog_yes), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
adapter.removeCharacter(boundCharacter);
......
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