https://github.com/denzcoskun/libdenx
Android base structure project is usable submodule. With this library you can write less code and develop faster.
BaseActivity include onViewReady and getLayoutResourceId functions.
onViewReady works like onCreate. You can write your code here and you can use instead of onCreate.
getLayoutResourceId is used to link the class with the layout like setContentView. Actually BaseActivity uses setContentView in background.
You can use with ButterKnife.
public class MainActivity extends BaseActivity {
@Override
protected void onViewReady(Bundle savedInstanceState, Intent intent) {
super.onViewReady(savedInstanceState, intent);
}
@Override
protected int getLayoutResourceId() {
return R.layout.activity_main;
}
}
addBackButton();
getJsonObject("Your Url", YourModel.class, result -> {
//result is your response model. You can use here.
});
getJsonArray("Your Url", result -> {
// result is your response array. You can use here.
});
isNetworkConnected();
showMessage(int Message);
//or
showMessage(String Message);
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.5'
implementation 'com.fasterxml.jackson.core:jackson-core:2.8.5'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.8.5'
git submodule add https://github.com/denzcoskun/libdenx.git
include ':app', ':libdenx'
implementation project(path: ':libdenx')
You can use this project now.
Java programming language was used.
The projects we use will develop in this project in line with our needs.
Contributors can be in touch with me on these platforms.