Added filtering pokemons which you wish to show #175

Merged
merged 36 commits into from Jul 26, 2016

Projects

None yet

6 participants

@fess89
Contributor
fess89 commented Jul 26, 2016

The settings screen now has an item "Pokemons to show" where the user can select pokemons which need to be shown (all are on by default).

fess89 added some commits Jul 20, 2016
@fess89 fess89 Added the S2 geometry library 0f9000d
@fess89 fess89 Included the S2 geometry library; added RxJava and a suitable Retrofi…
…t/OkHTTP client
31b41a1
@fess89 fess89 Work in progress 3726c96
@fess89 fess89 Work in progress 9eea102
@fess89 fess89 Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/omkarmoghe/pokemap/MainActivity.java
#	app/src/main/java/com/omkarmoghe/pokemap/map/MapWrapperFragment.java
d576cf3
@fess89 fess89 Work in progress b4ae9eb
@fess89 fess89 Working on location stuff cf26fe7
@fess89 fess89 Made Dagger components static 23b3c49
@fess89 fess89 Added optimization to proguard rules 1021e4d
@fess89 fess89 Disabled debug builds minification and enabled multidex d322619
@fess89 fess89 Formatting fixes 7e35811
@fess89 fess89 Fixed gradle issues d303dcf
@fess89 fess89 Minor change 410cff8
@fess89 fess89 Work in progress e60a1d0
@fess89 fess89 Removed constraint layout 86d039d
@fess89 fess89 Removed s2-geometry-library folder e1a5850
@fess89 fess89 Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts:
#	app/src/main/java/com/omkarmoghe/pokemap/MainActivity.java
#	app/src/main/java/com/omkarmoghe/pokemap/network/NianticManager.java
2b67242
@fess89 fess89 Added presenters to start implementing the MVP pattern d534acb
@fess89 fess89 Added model which makes use of Observable f6eee62
@fess89 fess89 Added model that makes use of Observables 0b63c82
@fess89 fess89 Added retrofit-rxjava 53079b4
@fess89 fess89 Work in progress 8f96833
@fess89 fess89 Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts:
#	app/src/main/java/com/omkarmoghe/pokemap/MainActivity.java
#	app/src/main/java/com/omkarmoghe/pokemap/network/NianticManager.java
e094609
@fess89 fess89 Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts:
#	app/build.gradle
#	app/proguard-rules.pro
#	app/src/main/java/com/omkarmoghe/pokemap/MainActivity.java
#	app/src/main/java/com/omkarmoghe/pokemap/map/MapWrapperFragment.java
#	app/src/main/java/com/omkarmoghe/pokemap/network/NianticManager.java
#	app/src/main/java/com/omkarmoghe/pokemap/views/BaseActivity.java
#	build.gradle
ee5f8ed
@fess89 fess89 Removed unnecessary files dee793d
@fess89 fess89 Added a stub preference which stores IDs of pokemons to show on the map 394c95c
@fess89 fess89 Work in progress 60d6f18
@fess89 fess89 Added pokemon display filtering 5d92ca3
@fess89 fess89 Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts:
#	app/src/main/java/com/omkarmoghe/pokemap/views/map/MapWrapperFragment.java
2e5568b
@fess89
Contributor
fess89 commented Jul 26, 2016

filtering

@s7092910 s7092910 commented on an outdated diff Jul 26, 2016
.../omkarmoghe/pokemap/views/map/MapWrapperFragment.java
- });
- //Increase founded pokemon counter
- pokemonFound++;
+ if (!markerKeys.contains(poke.getSpawnPointId())) {
+
+ // checking if we need to show this pokemon
+ PokemonIdOuterClass.PokemonId pokemonId = poke.getPokemonId();
+ if (showablePokemonIDs.contains(pokemonId)) {
+
+ //Showing images using glide
+ Glide.with(getActivity())
+ .load("http://serebii.net/pokemongo/pokemon/" + getCorrectPokemonImageId(pokemonId.getNumber()) + ".png")
+ .asBitmap()
+ .skipMemoryCache(false)
+ .diskCacheStrategy(DiskCacheStrategy.ALL)
+ .into(new SimpleTarget<Bitmap>(120, 120) { // Width and height FIXME: Maybe get different sizes based on devices DPI? this need tests
@s7092910
s7092910 Jul 26, 2016 Contributor

Missing Change from PR #169

fess89 added some commits Jul 26, 2016
@fess89 fess89 Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts:
#	app/src/main/java/com/omkarmoghe/pokemap/views/map/MapWrapperFragment.java
#	app/src/main/res/values/strings.xml
720a768
@fess89 fess89 Incorporated changes from PR #169 1441a98
@fess89
Contributor
fess89 commented Jul 26, 2016

@s7092910 thanks for pointing that out, added the change

@DarkN3ss61
Collaborator

Would be cool if you had a little image of each pokemon next to the name

@fess89
Contributor
fess89 commented Jul 26, 2016

@DarkN3ss61 I could try, for now it is just the standard preferences list dialog which does not have images

@Anu6is
Anu6is commented Jul 26, 2016

The plural of Pokemon should be Pokemon.

@fess89
Contributor
fess89 commented Jul 26, 2016

@Anu6is you are correct, fixed

@comann
Collaborator
comann commented Jul 26, 2016

Awesome feature. Please update to dev tip.

@omkarmoghe
Owner

Dope!

fess89 added some commits Jul 26, 2016
@fess89 fess89 Added pokemon icons to the filter 930e6a6
@fess89 fess89 Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts:
#	app/src/main/java/com/omkarmoghe/pokemap/views/map/MapWrapperFragment.java
2395a50
@fess89
Contributor
fess89 commented Jul 26, 2016

resolved merge conflicts, added pokemon icons to the filter list
filtering-with-icons

@comann
Collaborator
comann commented Jul 26, 2016

Does this still use AndroidAnnotations?

@comann comann merged commit 1c78492 into omkarmoghe:dev Jul 26, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment