Skip to content
This repository has been archived by the owner on Dec 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #40 from Longi94/development
Browse files Browse the repository at this point in the history
v2.1.0 Development
  • Loading branch information
Longi94 committed May 1, 2016
2 parents 691e1b9 + 0417c86 commit 439fbca
Show file tree
Hide file tree
Showing 71 changed files with 1,305 additions and 802 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ STEAM_WEB_API_KEY=DUMMY_KEY
- You need a steam web API key (http://steamcommunity.com/dev/apikey) in order to be able to download steam user data.

## Technologies
It would be really if you were somewhat familiar with the technologies and concepts. If not, I provided some userful links for you.
It would be really if you were somewhat familiar with the technologies and concepts. If not, I provided some useful links for you.
- Dependency using dagger 2
- https://guides.codepath.com/android/Dependency-Injection-with-Dagger-2
- Model-View-Presenter design pattern
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ The unofficial backpack.tf mobile application
Fork this repository and contribute by creating a pull request. Notable contributions will be credited in the application. See the [contributing guidelines](https://github.com/Longi94/bptf/blob/master/CONTRIBUTING.md) before contributing.

### 3rd party libraries
- [Answers](https://fabric.io/kits/android/answers)
- [Butter Knife](http://jakewharton.github.io/butterknife/)
- [Crashlytics](https://try.crashlytics.com/)
- [Dagger 2](http://google.github.io/dagger/)
- [Dart 2](https://github.com/f2prateek/dart)
- [Glide](https://github.com/bumptech/glide)
Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
applicationId "com.tlongdev.bktf"
minSdkVersion 14
targetSdkVersion 23
versionCode 41
versionCode 42
versionName "2.1.0"

applicationVariants.all { variant ->
Expand Down Expand Up @@ -60,6 +60,7 @@ dependencies {
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile "org.robolectric:robolectric:3.1-SNAPSHOT"

apt 'com.jakewharton:butterknife-compiler:8.0.0'
apt 'com.google.dagger:dagger-compiler:2.0.2'
provided 'com.f2prateek.dart:dart-processor:2.0.0'
provided 'org.glassfish:javax.annotation:10.0-b28'
Expand All @@ -84,7 +85,7 @@ dependencies {
compile 'com.google.dagger:dagger:2.0.2'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.3'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.jakewharton:butterknife:8.0.1'
compile('com.squareup.okhttp3:okhttp:3.2.0') {
exclude group: 'com.squareup.okio', module: 'okio'
}
Expand Down
3 changes: 3 additions & 0 deletions app/proguard_general.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
-dontobfuscate
-optimizations !code/allocation/variable

-dontwarn android.support.**
-keep class android.support.** { *; }
-keep interface android.support.** { *; }
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/java/com/tlongdev/bktf/BptfApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@
import com.tlongdev.bktf.component.AdapterComponent;
import com.tlongdev.bktf.component.DaggerActivityComponent;
import com.tlongdev.bktf.component.DaggerAdapterComponent;
import com.tlongdev.bktf.component.DaggerDrawerManagerComponent;
import com.tlongdev.bktf.component.DaggerFragmentComponent;
import com.tlongdev.bktf.component.DaggerInteractorComponent;
import com.tlongdev.bktf.component.DaggerPresenterComponent;
import com.tlongdev.bktf.component.DaggerProfileManagerComponent;
import com.tlongdev.bktf.component.DaggerServiceComponent;
import com.tlongdev.bktf.component.DrawerManagerComponent;
import com.tlongdev.bktf.component.FragmentComponent;
import com.tlongdev.bktf.component.InteractorComponent;
import com.tlongdev.bktf.component.PresenterComponent;
import com.tlongdev.bktf.component.ProfileManagerComponent;
import com.tlongdev.bktf.component.ServiceComponent;
import com.tlongdev.bktf.module.BptfAppModule;
import com.tlongdev.bktf.module.NetworkModule;
import com.tlongdev.bktf.module.PresenterModule;
import com.tlongdev.bktf.module.StorageModule;
import com.tlongdev.bktf.util.ProfileManager;

Expand All @@ -63,6 +66,8 @@ public class BptfApplication extends Application {

private ServiceComponent mServiceComponent;

private DrawerManagerComponent mDrawerManagerComponent;

@Override
public void onCreate() {
super.onCreate();
Expand All @@ -73,13 +78,16 @@ public void onCreate() {
BptfAppModule appModule = new BptfAppModule(this);
StorageModule storageModule = new StorageModule();
NetworkModule networkModule = new NetworkModule();
PresenterModule presenterModule = new PresenterModule();

mActivityComponent = DaggerActivityComponent.builder()
.bptfAppModule(appModule)
.presenterModule(presenterModule)
.build();

mFragmentComponent = DaggerFragmentComponent.builder()
.bptfAppModule(appModule)
.presenterModule(presenterModule)
.build();

mInteractorComponent = DaggerInteractorComponent.builder()
Expand All @@ -106,6 +114,10 @@ public void onCreate() {
.storageModule(storageModule)
.build();

mDrawerManagerComponent = DaggerDrawerManagerComponent.builder()
.bptfAppModule(appModule)
.build();

if (!BuildConfig.DEBUG) {
ProfileManager manager = new ProfileManager(this);
if (manager.isSignedIn()) {
Expand Down Expand Up @@ -160,4 +172,8 @@ public AdapterComponent getAdapterComponent() {
public ServiceComponent getServiceComponent() {
return mServiceComponent;
}

public DrawerManagerComponent getDrawerManagerComponent() {
return mDrawerManagerComponent;
}
}
12 changes: 6 additions & 6 deletions app/src/main/java/com/tlongdev/bktf/adapter/BackpackAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
Expand Down Expand Up @@ -230,11 +230,11 @@ public void setListener(OnItemClickedListener listener) {
*/
public static class ViewHolder extends RecyclerView.ViewHolder {

@Nullable @Bind(R.id.text_view_header) public TextView header = null;
@Nullable @Bind(R.id.icon) public ImageView icon = null;
@Nullable @Bind(R.id.effect) public ImageView effect = null;
@Nullable @Bind(R.id.paint) public ImageView paint = null;
@Nullable @Bind(R.id.quality) public ImageView quality;
@Nullable @BindView(R.id.text_view_header) public TextView header = null;
@Nullable @BindView(R.id.icon) public ImageView icon = null;
@Nullable @BindView(R.id.effect) public ImageView effect = null;
@Nullable @BindView(R.id.paint) public ImageView paint = null;
@Nullable @BindView(R.id.quality) public ImageView quality;
public CardView root = null;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
Expand Down Expand Up @@ -182,14 +182,14 @@ public void clearDataSet() {
*/
public static class ViewHolder extends RecyclerView.ViewHolder {

@Bind(R.id.icon) ImageView icon;
@Bind(R.id.name) TextView name;
@Bind(R.id.price) TextView price;
@Bind(R.id.effect) ImageView effect;
@Bind(R.id.delete) ImageView delete;
@Bind(R.id.quality) ImageView quality;
@Bind(R.id.count) EditText count;
@Bind(R.id.icon_background) View background;
@BindView(R.id.icon) ImageView icon;
@BindView(R.id.name) TextView name;
@BindView(R.id.price) TextView price;
@BindView(R.id.effect) ImageView effect;
@BindView(R.id.delete) ImageView delete;
@BindView(R.id.quality) ImageView quality;
@BindView(R.id.count) EditText count;
@BindView(R.id.icon_background) View background;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

public class FavoritesAdapter extends RecyclerView.Adapter<FavoritesAdapter.ViewHolder> {
Expand Down Expand Up @@ -139,16 +139,16 @@ public void removeItem(Item item) {
public class ViewHolder extends RecyclerView.ViewHolder {

final View root;
@Bind(R.id.more) View more;
@Bind(R.id.icon_background) View background;
@BindView(R.id.more) View more;
@BindView(R.id.icon_background) View background;

@Bind(R.id.icon) ImageView icon;
@Bind(R.id.effect) ImageView effect;
@Bind(R.id.quality) ImageView quality;
@BindView(R.id.icon) ImageView icon;
@BindView(R.id.effect) ImageView effect;
@BindView(R.id.quality) ImageView quality;

@Bind(R.id.name) TextView name;
@Bind(R.id.price) TextView price;
@Bind(R.id.difference) TextView difference;
@BindView(R.id.name) TextView name;
@BindView(R.id.price) TextView price;
@BindView(R.id.difference) TextView difference;

/**
* Constructor.
Expand Down
22 changes: 11 additions & 11 deletions app/src/main/java/com/tlongdev/bktf/adapter/HistoryAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
Expand Down Expand Up @@ -263,16 +263,16 @@ public static class ViewHolder extends RecyclerView.ViewHolder {
/**
* The views of the element
*/
@Nullable @Bind(R.id.effect) ImageView effect;
@Nullable @Bind(R.id.icon) ImageView icon;
@Nullable @Bind(R.id.quality) ImageView quality;
@Nullable @Bind(R.id.name) TextView name;
@Nullable @Bind(R.id.history_chart) LineChart historyChart;
@Nullable @Bind(R.id.icon_card) CardView iconCard;

@Nullable @Bind(R.id.price) TextView price;
@Nullable @Bind(R.id.date) TextView date;
@Nullable @Bind(R.id.separator) View separator;
@Nullable @BindView(R.id.effect) ImageView effect;
@Nullable @BindView(R.id.icon) ImageView icon;
@Nullable @BindView(R.id.quality) ImageView quality;
@Nullable @BindView(R.id.name) TextView name;
@Nullable @BindView(R.id.history_chart) LineChart historyChart;
@Nullable @BindView(R.id.icon_card) CardView iconCard;

@Nullable @BindView(R.id.price) TextView price;
@Nullable @BindView(R.id.date) TextView date;
@Nullable @BindView(R.id.separator) View separator;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import java.util.List;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

public class LicensesAdapter extends RecyclerView.Adapter<LicensesAdapter.ViewHolder>{
Expand Down Expand Up @@ -77,9 +77,9 @@ public void setListener(OnClickListener listener) {

public class ViewHolder extends RecyclerView.ViewHolder {

@Bind(R.id.name) TextView name;
@Bind(R.id.link) TextView link;
@Bind(R.id.license) TextView license;
@BindView(R.id.name) TextView name;
@BindView(R.id.link) TextView link;
@BindView(R.id.license) TextView license;

public ViewHolder(View view) {
super(view);
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/java/com/tlongdev/bktf/adapter/RecentsAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
Expand Down Expand Up @@ -160,14 +160,14 @@ public void setListener(OnMoreListener listener) {
public static class ViewHolder extends RecyclerView.ViewHolder {

final View root;
@Bind(R.id.more) View more;
@Bind(R.id.icon_background) View background;
@Bind(R.id.icon) ImageView icon;
@Bind(R.id.effect) ImageView effect;
@Bind(R.id.quality) ImageView quality;
@Bind(R.id.name) TextView name;
@Bind(R.id.price) TextView price;
@Bind(R.id.difference) TextView difference;
@BindView(R.id.more) View more;
@BindView(R.id.icon_background) View background;
@BindView(R.id.icon) ImageView icon;
@BindView(R.id.effect) ImageView effect;
@BindView(R.id.quality) ImageView quality;
@BindView(R.id.name) TextView name;
@BindView(R.id.price) TextView price;
@BindView(R.id.difference) TextView difference;

public ViewHolder(View view) {
super(view);
Expand Down
20 changes: 10 additions & 10 deletions app/src/main/java/com/tlongdev/bktf/adapter/SearchAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
Expand Down Expand Up @@ -222,15 +222,15 @@ public void setListener(OnSearchClickListener listener) {
class ViewHolder extends RecyclerView.ViewHolder {

final View root;
@Bind(R.id.loading_layout) View loading;
@Bind(R.id.price_layout) View priceLayout;
@Bind(R.id.icon) ImageView icon;
@Bind(R.id.icon_background) View background;
@Bind(R.id.effect) ImageView effect;
@Bind(R.id.more) ImageView more;
@Bind(R.id.quality) ImageView quality;
@Bind(R.id.name) TextView name;
@Bind(R.id.price) TextView price;
@BindView(R.id.loading_layout) View loading;
@BindView(R.id.price_layout) View priceLayout;
@BindView(R.id.icon) ImageView icon;
@BindView(R.id.icon_background) View background;
@BindView(R.id.effect) ImageView effect;
@BindView(R.id.more) ImageView more;
@BindView(R.id.quality) ImageView quality;
@BindView(R.id.name) TextView name;
@BindView(R.id.price) TextView price;

public ViewHolder(View view) {
super(view);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

public class SelectItemAdapter extends RecyclerView.Adapter<SelectItemAdapter.ViewHolder> {
Expand Down Expand Up @@ -99,8 +99,8 @@ public void setListener(OnItemSelectedListener listener) {

public class ViewHolder extends RecyclerView.ViewHolder {

@Bind(R.id.icon) ImageView icon;
@Bind(R.id.name) TextView name;
@BindView(R.id.icon) ImageView icon;
@BindView(R.id.name) TextView name;
final View root;

public ViewHolder(View view) {
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/com/tlongdev/bktf/adapter/UnusualAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
Expand Down Expand Up @@ -180,11 +180,11 @@ class ViewHolder extends RecyclerView.ViewHolder {

final View root;

@Bind(R.id.icon) ImageView icon;
@Bind(R.id.effect) ImageView effect;
@Bind(R.id.price) TextView price;
@Bind(R.id.name) TextView name;
@Bind(R.id.more) View more;
@BindView(R.id.icon) ImageView icon;
@BindView(R.id.effect) ImageView effect;
@BindView(R.id.price) TextView price;
@BindView(R.id.name) TextView name;
@BindView(R.id.more) View more;

public ViewHolder(View view) {
super(view);
Expand Down
Loading

0 comments on commit 439fbca

Please sign in to comment.