小编use*_*391的帖子

Android Fragment WebView

我为我的同事中的某个人创建应用程序

我有app的问题

我的应用程序已滑动mene与此应用程序Youtube相同.

http://i.stack.imgur.com/4hxlM.png

但WebView的问题我有一个布局,它有webView

这是webView_layout.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:background="@drawable/background2"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="39dp"
        android:text="@string/aboutme"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <WebView
        android:id="@+id/webView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true" />

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

这是上课

package com.alyousafi.SeebClub;

import com.alyousafi.SeebClub.R;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class TimeTible_forgment extends Fragment {

    public TimeTible_forgment(){}

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        View rootView = inflater.inflate(R.layout.webView_layout, container, false);

        return rootView;
    }
}
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮助我如何在片段中使用WebView?这是大问题请帮帮我>>>

android fragment webview

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

android ×1

fragment ×1

webview ×1