com.github.ekulf.spotifystreamer.LicensesFragment.java Source code

Java tutorial

Introduction

Here is the source code for com.github.ekulf.spotifystreamer.LicensesFragment.java

Source

package com.github.ekulf.spotifystreamer;

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.WebView;

public class LicensesFragment extends Fragment {

    public LicensesFragment() {
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        WebView webView = new WebView(getActivity());
        webView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT));

        webView.loadUrl("file:///android_asset/licences.html");
        return webView;
    }
}