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
public class BaseDetailModel implements Parcelable { | |
@SerializedName("api_token") | |
@Expose | |
private String api_token; | |
@SerializedName("udid") | |
@Expose | |
private String udid; | |
@SerializedName("device_type") |
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
public class LoginModel extends BaseDetailModel { | |
@SerializedName("email") | |
@Expose | |
private String email; | |
@SerializedName("password") | |
@Expose | |
private String password; |
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
public class BaseModel<T> { | |
@SerializedName("request") | |
@Expose | |
private String requestName; | |
@SerializedName("para") | |
@Expose | |
private T model; |
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
public class LoginController { | |
ApiClient apiService = null; | |
OnWebAPIResponseListener mRepsonseListener; | |
Context context; | |
public LoginController(OnWebAPIResponseListener mRepsonseListener, Context context) { | |
this.context = context; | |
this.mRepsonseListener = mRepsonseListener; | |
apiService = AppController.getAppInstance().getApiClient(); |
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
public interface ApiClient { | |
String URL = ApiConst.BASE_URL; | |
@POST(URL + ApiConst.SUBSITE_URL) | |
Call<BaseResponse<MetaDataModel>> syncMetaData(@Body BaseModel model); | |
} |
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
public interface OnWebAPIResponseListener { | |
void onCallComplete(BaseResponse baseResponse, int requestCode); | |
// void onCallComplete(List<?> obj, int requestCode); | |
void onCallError(ErrorResponse errorModel, int requestCode); | |
} |
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
public class AppController extends Application { | |
public static final int DISK_CACHE_SIZE = 10 * 1024 * 1024; // 10 MB | |
private static AppController appInstance = null; | |
private static Retrofit retrofit; | |
private static MyDatabase database; | |
private static Gson gson = new GsonBuilder() | |
.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) | |
// .setDateFormat(DATE_FORMATS) |
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
public class HtmlTagHandler implements Html.TagHandler { | |
String parent = null; | |
boolean first = true; | |
int index = 1; | |
private int mListItemCount = 0; | |
private Vector<String> mListParents = new Vector<String>(); | |
@Override | |
public void handleTag(final boolean opening, final String tag, Editable output, final XMLReader xmlReader) { |
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
import android.content.Context; | |
import java.util.List; | |
import retrofit2.Call; |
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
public class BaseResponse<T> { | |
@SerializedName("data") | |
@Expose | |
private T data; | |
@SerializedName("status") | |
@Expose |
NewerOlder