Skip to content

Commit ab825ff

Browse files
author
Louis
committed
//V1.8.9 VC31
-Mise à jour des derniers operateurs -Bug fix sur l'activity des Operateurs
1 parent 675dc66 commit ab825ff

30 files changed

+136
-171
lines changed

.idea/misc.xml

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 26
5-
buildToolsVersion "26.0.0"
5+
buildToolsVersion '26.0.2'
66
defaultConfig {
77
applicationId "com.khrys.r6assistant"
88
minSdkVersion 16
99
targetSdkVersion 26
10-
versionCode 28
11-
versionName "1.8.7"
10+
versionCode 31
11+
versionName "1.8.9"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414
buildTypes {
@@ -20,21 +20,22 @@ android {
2020
}
2121

2222
dependencies {
23-
compile fileTree(dir: 'libs', include: ['*.jar'])
24-
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
23+
implementation fileTree(dir: 'libs', include: ['*.jar'])
24+
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
2525
exclude group: 'com.android.support', module: 'support-annotations'
2626
})
27-
compile 'com.android.support:appcompat-v7:25.3.1'
28-
compile 'com.android.support:recyclerview-v7:25.3.1'
29-
compile 'com.android.support:cardview-v7:25.3.1'
30-
compile 'com.github.chrisbanes:PhotoView:1.3.1'
31-
compile 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
32-
compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
33-
compile 'com.bignerdranch.android:expandablerecyclerview:1.0.3'
34-
compile 'ca.barrenechea.header-decor:header-decor:0.2.8'
35-
compile 'com.android.support:design:25.3.1'
36-
compile 'com.firebaseui:firebase-ui:2.0.1'
37-
compile "com.google.firebase:firebase-database:11.0.1"
38-
testCompile 'junit:junit:4.12'
27+
implementation 'com.android.support:appcompat-v7:26.1.0'
28+
implementation 'com.android.support:recyclerview-v7:26.1.0'
29+
implementation 'com.android.support:cardview-v7:26.1.0'
30+
implementation 'com.android.support:design:26.1.0'
31+
implementation 'com.github.chrisbanes:PhotoView:1.3.1'
32+
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
33+
implementation 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
34+
implementation 'com.bignerdranch.android:expandablerecyclerview:1.0.3'
35+
implementation 'ca.barrenechea.header-decor:header-decor:0.2.8'
36+
implementation 'com.android.support:design:26.1.0'
37+
implementation 'com.firebaseui:firebase-ui:2.0.1'
38+
implementation "com.google.firebase:firebase-database:11.0.1"
39+
testImplementation 'junit:junit:4.12'
3940
}
4041
apply plugin: 'com.google.gms.google-services'

app/src/main/java/com/khrys/r6assistant/ZoomActivity.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99

1010
import uk.co.senab.photoview.PhotoViewAttacher;
1111

12-
/**
13-
* Created by Chrysler on 10/23/2016.
14-
* <p>
15-
* RainbowSixPartner
16-
*/
12+
/*
13+
* Created by Khrys.
14+
*
15+
* App : RainbowSixAssistant
16+
* Info : 23/10/2016[00:00 PM]
17+
*/
1718

1819
public class ZoomActivity extends AppCompatActivity
1920
{

app/src/main/java/com/khrys/r6assistant/about/AboutActivity.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
public class AboutActivity extends AppCompatActivity
1818
{
19-
ImageView imgGit;
20-
2119
@Override
2220
protected void onCreate(Bundle savedInstanceState)
2321
{
@@ -30,7 +28,7 @@ protected void onCreate(Bundle savedInstanceState)
3028
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
3129
}
3230

33-
imgGit = (ImageView) findViewById(R.id.imageGit);
31+
ImageView imgGit = findViewById(R.id.imageGit);
3432

3533
imgGit.setOnClickListener(new View.OnClickListener()
3634
{

app/src/main/java/com/khrys/r6assistant/operators/CountryFragment.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
package com.khrys.r6assistant.operators;
22
/*
3-
* Created by Louis on 31/05/2017.
4-
*
5-
* R6Assistant
3+
* Created by Khrys.
4+
*
5+
* App : RainbowSixAssistant
6+
* Info : 05/31/2017[00:00 PM]
67
*/
78

89
import android.content.res.TypedArray;
910
import android.os.Bundle;
1011
import android.support.v4.app.Fragment;
1112
import android.support.v7.widget.LinearLayoutManager;
1213
import android.support.v7.widget.RecyclerView;
14+
import android.util.Log;
1315
import android.view.LayoutInflater;
1416
import android.view.View;
1517
import android.view.ViewGroup;
@@ -19,6 +21,7 @@
1921

2022
import java.util.ArrayList;
2123
import java.util.List;
24+
import java.util.Locale;
2225

2326
public class CountryFragment extends Fragment
2427
{
@@ -34,7 +37,7 @@ public void onViewCreated(View view, Bundle savedInstanceState)
3437
super.onViewCreated(view, savedInstanceState);
3538
RecyclerView recyclerView = view.findViewById(R.id.WeaponsRecycler);
3639

37-
CountryListExpandableAdapter mOperatorsListExpandableAdapter = new CountryListExpandableAdapter(getContext(), generateOperatorsList());
40+
CountryListExpandableAdapter mOperatorsListExpandableAdapter = new CountryListExpandableAdapter(getContext(), generateOperatorsList(view));
3841
mOperatorsListExpandableAdapter.setCustomParentAnimationViewId(R.id.parent_list_item_expand_arrow);
3942
mOperatorsListExpandableAdapter.setParentClickableViewAnimationDefaultDuration();
4043
mOperatorsListExpandableAdapter.setParentAndIconExpandOnClick(true);
@@ -43,7 +46,7 @@ public void onViewCreated(View view, Bundle savedInstanceState)
4346
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
4447
}
4548

46-
private ArrayList<ParentObject> generateOperatorsList()
49+
private ArrayList<ParentObject> generateOperatorsList(View view)
4750
{
4851
List<Country> countriesList = new ArrayList<>();
4952

@@ -52,7 +55,7 @@ private ArrayList<ParentObject> generateOperatorsList()
5255
String ct = tableCtries.getString(i);
5356
String img = "flag_" + tableCtries.getString(i - 1);
5457

55-
int imgid = getResources().getIdentifier(img, "drawable", getContext().getPackageName());
58+
int imgid = getResources().getIdentifier(img, "drawable", view.getContext().getPackageName());
5659

5760
countriesList.add(new Country(ct, imgid));
5861
}
@@ -65,8 +68,8 @@ private ArrayList<ParentObject> generateOperatorsList()
6568
String ct = country.getName();
6669
ct = ct.replace(' ', '_');
6770
ct = ct.replace('.', '_');
68-
ct = ct.toLowerCase();
69-
int arrayId = getResources().getIdentifier(ct, "array", getContext().getPackageName());
71+
ct = ct.toLowerCase(Locale.ENGLISH);
72+
int arrayId = getResources().getIdentifier(ct, "array", view.getContext().getPackageName());
7073
String[] ctOp = getResources().getStringArray(arrayId);
7174

7275
ArrayList<Object> childList = new ArrayList<>();
@@ -77,7 +80,7 @@ private ArrayList<ParentObject> generateOperatorsList()
7780
imgArmeId = imgArmeId.replace('ä','a');
7881
imgArmeId = imgArmeId.replace('ã','a');
7982

80-
int resID = getResources().getIdentifier(imgArmeId, "drawable", getContext().getPackageName());
83+
int resID = getResources().getIdentifier(imgArmeId, "drawable", view.getContext().getPackageName());
8184

8285
childList.add(new Operator(resID, operators));
8386
}

app/src/main/java/com/khrys/r6assistant/operators/OperatorActivity.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ protected void onCreate(Bundle savedInstanceState)
110110
int numberSpeed = opArray.getInt(numberWeapons, 0);
111111
int numberArmor = opArray.getInt(numberWeapons+ 1, 0);
112112

113-
114113
String numberGadget1 = opArray.getString(numberWeapons + 2);
115114
String nameGadget1 = opArray.getString(numberWeapons + 3);
116115

117116
String numberGadget2 = opArray.getString(numberWeapons + 4);
118117
String nameGadget2 = opArray.getString(numberWeapons + 5);
119118

119+
int numberUniqueGadget = opArray.getInt(numberWeapons + 6, 0);
120120

121121
for (int i = 5; i < numberScd; i++)
122122
{
@@ -293,7 +293,13 @@ else if(sideOp.equals("atk"))
293293
int imgUnGadget = getResources().getIdentifier(idGadget, "drawable", getPackageName());
294294
int txtUnGadget = getResources().getIdentifier(idDescGadget, "string", getPackageName());
295295

296-
titleUniqueGadget.setText(titleUnGadget);
296+
String titleGadgetString = getString(titleUnGadget);
297+
if(numberUniqueGadget != 0)
298+
{
299+
titleGadgetString += " x"+numberUniqueGadget;
300+
}
301+
302+
titleUniqueGadget.setText(titleGadgetString);
297303
imgUniqueGadget.setImageResource(imgUnGadget);
298304
txtUniqueGadget.setText(txtUnGadget);
299305
}

app/src/main/java/com/khrys/r6assistant/operators/OperatorFragment.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package com.khrys.r6assistant.operators;
22
/*
3-
* Created by Louis on 31/05/2017.
4-
*
5-
* R6Assistant
3+
* Created by Khrys.
4+
*
5+
* App : RainbowSixAssistant
6+
* Info : 05/31/2017[00:00 PM]
67
*/
78

89
import android.content.res.TypedArray;

app/src/main/java/com/khrys/r6assistant/operators/OperatorMenuActivity.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
* R6Assistant
66
*/
77

8-
import android.content.DialogInterface;
9-
import android.content.SharedPreferences;
108
import android.os.Bundle;
119
import android.support.v4.app.FragmentPagerAdapter;
1210
import android.support.v4.view.ViewPager;
13-
import android.support.v7.app.AlertDialog;
1411
import android.support.v7.app.AppCompatActivity;
1512
import android.view.MenuItem;
1613

1714
import com.khrys.r6assistant.R;
18-
import com.khrys.r6assistant.weapons.WeaponMenuActivity;
1915
import com.ogaclejapan.smarttablayout.SmartTabLayout;
2016
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItemAdapter;
2117
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItems;
@@ -34,22 +30,6 @@ protected void onCreate(Bundle savedInstanceState)
3430
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
3531
}
3632

37-
if (isFirstTime()) {
38-
AlertDialog.Builder builder = new AlertDialog.Builder(OperatorMenuActivity.this, R.style.MyAlertDialogStyle);
39-
builder.setTitle(R.string.warning)
40-
.setMessage(R.string.beta_msg)
41-
.setIcon(R.drawable.ic_info)
42-
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener()
43-
{
44-
public void onClick(DialogInterface dialog, int id)
45-
{
46-
47-
}
48-
});
49-
AlertDialog dialog = builder.create();
50-
dialog.show();
51-
}
52-
5333
FragmentPagerAdapter fragmentAdapter = new FragmentPagerItemAdapter(
5434
getSupportFragmentManager(), FragmentPagerItems.with(this)
5535
.add(R.string.byoperator, OperatorFragment.class)
@@ -63,18 +43,6 @@ public void onClick(DialogInterface dialog, int id)
6343
tabLayout.setViewPager(viewPager);
6444
}
6545

66-
private boolean isFirstTime()
67-
{
68-
SharedPreferences preferences = getPreferences(MODE_PRIVATE);
69-
boolean ranBefore = preferences.getBoolean("RanBefore", false);
70-
if (!ranBefore) {
71-
SharedPreferences.Editor editor = preferences.edit();
72-
editor.putBoolean("RanBefore", true);
73-
editor.apply();
74-
}
75-
return !ranBefore;
76-
}
77-
7846
@Override
7947
public boolean onOptionsItemSelected(MenuItem item)
8048
{

app/src/main/res/drawable/g_f0_12.jpg

-4.98 KB
Loading

app/src/main/res/drawable/g_q_929.jpg

-5.46 KB
Loading

0 commit comments

Comments
 (0)