com.rizal.lovins.smartkasir.fragment.HomeKasirFragment.java Source code

Java tutorial

Introduction

Here is the source code for com.rizal.lovins.smartkasir.fragment.HomeKasirFragment.java

Source

package com.rizal.lovins.smartkasir.fragment;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;

import com.rizal.lovins.smartkasir.R;

public class HomeKasirFragment extends Fragment {

    @SuppressLint("SetJavaScriptEnabled")
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_home_kasir, container, false);

        WebView mWebView = (WebView) view.findViewById(R.id.webViewKasir);
        WebSettings webSettings = mWebView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        mWebView.getSettings().setBuiltInZoomControls(false);
        mWebView.getSettings().setDisplayZoomControls(false);
        mWebView.loadUrl("file:///android_asset/license/index_kasir.html");

        return view;
    }
}