コード例 #1
0
  public EntryDialog(Activity context) {
    super(context, android.R.style.Theme_Light);
    mMenuInflater = context.getMenuInflater();

    // Request a progress bar to display while the HTML content is loading.
    Window window = getWindow();
    ProgressMonitor.requestWindowFeatures(window);

    setContentView(R.layout.atom_entry);

    // Find the ScrollView
    mScrollView = (ScrollView) findViewById(android.R.id.tabcontent);

    // Find the title view, and make it a clickable link
    mTitleView = (TextView) findViewById(android.R.id.text1);
    addLinkMovementMethod(mTitleView);

    // Find the content view, and configure the progress monitor.
    mContentView = (WebView) findViewById(android.R.id.text2);
    WebChromeClient monitor = new ProgressMonitor(window);
    mContentView.setWebChromeClient(monitor);
  }