-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffe1e03
commit 076001f
Showing
70 changed files
with
1,357 additions
and
839 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/build | ||
/onCreateViewHolder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
...x/restaurantx/adapter/IAdapterHelper.java → ...x/restaurantx/adapter/IAdapterBinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
package com.example.alex.restaurantx.adapter; | ||
|
||
|
||
import android.support.v7.widget.RecyclerView; | ||
import android.view.View; | ||
|
||
public interface IAdapterHelper<Holder extends RecyclerView.ViewHolder, DataStructure> { | ||
|
||
void OnBindViewHolder(final DataStructure structure, final Holder pHolder, final int pPosition); | ||
public interface IAdapterBinder<Holder extends RecyclerView.ViewHolder, DataStructure> { | ||
|
||
Holder build(View view); | ||
void onBindViewHolder(final DataStructure structure, final Holder pHolder, final int pPosition); | ||
|
||
Holder onCreateViewHolder(View view); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 25 additions & 17 deletions
42
app/src/main/java/com/example/alex/restaurantx/constants/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,48 @@ | ||
package com.example.alex.restaurantx.constants; | ||
|
||
import com.example.alex.restaurantx.holders.ContextHolder; | ||
|
||
public interface Constants { | ||
|
||
String INTENT_EXTRA_TYPE = "type"; | ||
String INTENT_EXTRA_DISH_NAME = "dish_name"; | ||
String INTENT_EXTRA_HAVE_PROHIBITED = "have_prohibited"; | ||
String INTENT_EXTRA_TYPE = "EXTRA_TYPE"; | ||
String INTENT_EXTRA_DISH_NAME = "EXTRA_DISH_NAME"; | ||
String INTENT_EXTRA_HAVE_PROHIBITED = "EXTRA_HAVE_PROHIBITED"; | ||
String INTENT_EXTRA_ACTION_UPDATE = "EXTRA_ACTION_UPDATE"; | ||
String ACTION_UPDATE_BROADCAST = "com.alex.restaurantx.ACTION_UPDATE_BROADCAST"; | ||
String SETTINGS_FILENAME = "SettingsIngredients"; | ||
String BROADCAST_UPDATE_MESSAGE = "UPDATE"; | ||
int DATABASE_CURRENT_VERSION = 1; | ||
String INTENT_SERVICE_UPDATE_ACTION = ContextHolder.getInstance().getContext().getPackageName() + ".UPDATE_MENU"; | ||
|
||
interface ApiSettings { | ||
//restaurant/api/request?method= | ||
String BASE_URL = "http://192.168.100.11:8080/"; | ||
String PART_URL = "api/"; | ||
String TYPES_METHOD = "types"; | ||
String MENU_METHOD = "dishes"; | ||
String RATE_METHOD = "rate?name=%s&id=%s&rate=%s"; | ||
String ADD_COMMENT_METHOD = "comment?name=%s&id=%s&comment=%s"; | ||
String COMMENTS_METHOD = "comments?name=%s"; | ||
String GET_METHOD = "GET"; | ||
|
||
//restaurant/app/api/request_type/request_name?params= | ||
String HOST_URL = "http://192.168.100.10:8080/"; | ||
String RELATIVE_URL = "app/api/"; | ||
String LIST_TYPES = "list/types"; | ||
String LIST_DISHES = "list/dishes"; | ||
String ADD_RATE = "add/rate?dishname=%s&appid=%s&rate=%s"; | ||
String ADD_COMMENT = "add/comment?dishname=%s&appid=%s&comment=%s"; | ||
String LIST_COMMENTS = "list/comments?dishname=%s"; | ||
} | ||
|
||
interface ImageLoaderSettings { | ||
|
||
int DEFAULT_MEMORY_CACHE_SIZE = 12 * 1024 * 1024; | ||
int MEMORY_FACTOR = 4; | ||
} | ||
|
||
interface ThreadManagerSettings { | ||
|
||
int DEFAULT_NUMBER_OF_THREADS = 3; | ||
int DEFAULT_PROCESSORS_THRESHOLD = 3; | ||
} | ||
|
||
interface JsonHandlerSettings { | ||
|
||
String RESPONSE = "response"; | ||
String COMMENTS = "comments"; | ||
String TYPES = "types"; | ||
} | ||
|
||
interface DatabaseSettings { | ||
|
||
String DATABASE_NAME = "xrestdb.sqlite"; | ||
int DATABASE_CURRENT_VERSION = 1; | ||
} | ||
} |
Oops, something went wrong.