store info page updated
This commit is contained in:
@@ -49,4 +49,6 @@ public class ApiConstants {
|
|||||||
public static final String PAYMENT_WEBVIEW_MAIN_PAGE_HTTP = "http://172.104.247.141/";
|
public static final String PAYMENT_WEBVIEW_MAIN_PAGE_HTTP = "http://172.104.247.141/";
|
||||||
public static final String PAYMENT_WEBVIEW_MAIN_PAGE_HTTPS = "https://172.104.247.141/";
|
public static final String PAYMENT_WEBVIEW_MAIN_PAGE_HTTPS = "https://172.104.247.141/";
|
||||||
|
|
||||||
|
public static final String STORE_INFO_WEB_PAGE_URL = "http://172.104.247.141/lemon/index.php?route=information/information&information_id=4";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import butterknife.BindString;
|
|||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import ch.pizzalemon.android.R;
|
import ch.pizzalemon.android.R;
|
||||||
|
import ch.pizzalemon.android.api.ApiConstants;
|
||||||
import ch.pizzalemon.android.api.ApiErrorUtils;
|
import ch.pizzalemon.android.api.ApiErrorUtils;
|
||||||
import ch.pizzalemon.android.api.ApiService;
|
import ch.pizzalemon.android.api.ApiService;
|
||||||
import ch.pizzalemon.android.api.ResponseObject;
|
import ch.pizzalemon.android.api.ResponseObject;
|
||||||
@@ -48,14 +49,16 @@ public class StoreInfoFragment extends BaseFragment {
|
|||||||
View view = inflater.inflate(R.layout.fragment_store_info, container, false);
|
View view = inflater.inflate(R.layout.fragment_store_info, container, false);
|
||||||
ButterKnife.bind(this, view);
|
ButterKnife.bind(this, view);
|
||||||
initViews();
|
initViews();
|
||||||
getStoreInfo();
|
//getStoreInfo();
|
||||||
|
initWebView();
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initViews(){
|
private void initViews(){
|
||||||
setPizzalinkToolbarFields(false, "");
|
setPizzalinkToolbarFields(false, getString(R.string.store_info_title));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
private void getStoreInfo(){
|
private void getStoreInfo(){
|
||||||
DialogHelper.showLoadingDialog();
|
DialogHelper.showLoadingDialog();
|
||||||
Call<ResponseObject<StoreInfoModel>> call = ApiService.apiInterface.getStoreInfo(SessionHelper.getSelectedStore().getStoreName());
|
Call<ResponseObject<StoreInfoModel>> call = ApiService.apiInterface.getStoreInfo(SessionHelper.getSelectedStore().getStoreName());
|
||||||
@@ -80,14 +83,19 @@ public class StoreInfoFragment extends BaseFragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
private void initWebView(StoreInfoModel storeInfoModel) {
|
private void initWebView(StoreInfoModel storeInfoModel) {
|
||||||
storeInfoModel.checkNull();
|
storeInfoModel.checkNull();
|
||||||
setPizzalinkToolbarFields(false, storeInfoModel.getTitle());
|
|
||||||
storeInfoWebView.setVerticalScrollBarEnabled(false);
|
storeInfoWebView.setVerticalScrollBarEnabled(false);
|
||||||
storeInfoWebView.getSettings().setJavaScriptEnabled(true);
|
storeInfoWebView.getSettings().setJavaScriptEnabled(true);
|
||||||
storeInfoWebView.loadDataWithBaseURL("", createFixedHTML(storeInfoModel.getContent()), "text/html", "UTF-8", "");
|
storeInfoWebView.loadDataWithBaseURL("", createFixedHTML(storeInfoModel.getContent()), "text/html", "UTF-8", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initWebView(){
|
||||||
|
storeInfoWebView.getSettings().setJavaScriptEnabled(true);
|
||||||
|
storeInfoWebView.loadUrl(ApiConstants.STORE_INFO_WEB_PAGE_URL);
|
||||||
|
storeInfoWebView.setVerticalScrollBarEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String createFixedHTML(String html){
|
private String createFixedHTML(String html){
|
||||||
|
|||||||
@@ -255,5 +255,7 @@
|
|||||||
<string name="new_address_added">Adresse wurde erfolgreich hinzugefügt.</string>
|
<string name="new_address_added">Adresse wurde erfolgreich hinzugefügt.</string>
|
||||||
<!-- AddAddressActivity-->
|
<!-- AddAddressActivity-->
|
||||||
|
|
||||||
|
<string name="store_info_title">Über uns</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user