store info page updated

This commit is contained in:
2020-11-14 20:10:54 +03:00
parent b9d0fdbca2
commit 9cab85d66b
3 changed files with 15 additions and 3 deletions

View File

@@ -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_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";
}

View File

@@ -10,6 +10,7 @@ import butterknife.BindString;
import butterknife.BindView;
import butterknife.ButterKnife;
import ch.pizzalemon.android.R;
import ch.pizzalemon.android.api.ApiConstants;
import ch.pizzalemon.android.api.ApiErrorUtils;
import ch.pizzalemon.android.api.ApiService;
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);
ButterKnife.bind(this, view);
initViews();
getStoreInfo();
//getStoreInfo();
initWebView();
return view;
}
private void initViews(){
setPizzalinkToolbarFields(false, "");
setPizzalinkToolbarFields(false, getString(R.string.store_info_title));
}
/*
private void getStoreInfo(){
DialogHelper.showLoadingDialog();
Call<ResponseObject<StoreInfoModel>> call = ApiService.apiInterface.getStoreInfo(SessionHelper.getSelectedStore().getStoreName());
@@ -80,14 +83,19 @@ public class StoreInfoFragment extends BaseFragment {
}
});
}
*/
private void initWebView(StoreInfoModel storeInfoModel) {
storeInfoModel.checkNull();
setPizzalinkToolbarFields(false, storeInfoModel.getTitle());
storeInfoWebView.setVerticalScrollBarEnabled(false);
storeInfoWebView.getSettings().setJavaScriptEnabled(true);
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){

View File

@@ -255,5 +255,7 @@
<string name="new_address_added">Adresse wurde erfolgreich hinzugefügt.</string>
<!-- AddAddressActivity-->
<string name="store_info_title">Über uns</string>
</resources>