<commit_before>package io.github.hidroh.materialistic;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.ShareActionProvider;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;

import javax.inject.Inject;

import io.github.hidroh.materialistic.data.FavoriteManager;
import io.github.hidroh.materialistic.data.ItemManager;

public class WebActivity extends BaseItemActivity {

    public static final String EXTRA_ITEM = WebActivity.class.getName() + ".EXTRA_ITEM";
    private ItemManager.WebItem mItem;
    private boolean mIsFavorite;
    private int mFavoriteOnResId;
    private int mFavoriteOffResId;
    @Inject FavoriteManager mFavoriteManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mItem = getIntent().getParcelableExtra(EXTRA_ITEM);
        if (mItem.getType() == ItemManager.WebItem.Type.comment) {
            setTitle(null);
        } else {
            setTitle(mItem.getDisplayedTitle());
        }
        getSupportFragmentManager()
                .beginTransaction()
                .replace(android.R.id.content,
                        WebFragment.instantiate(this, mItem),
                        WebFragment.class.getName())
                .commit();
        mFavoriteOnResId = AppUtils.getThemedResId(this, R.attr.themedMenuFavoriteOnDrawable);
        mFavoriteOffResId = AppUtils.getThemedResId(this, R.attr.themedMenuFavoriteOffDrawable);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_web, menu);
        ShareActionProvider shareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(
                menu.findItem(R.id.menu_share));
        shareActionProvider.setShareIntent(AppUtils.makeShareIntent(<commit_msg>Render web fragment under toolbar<commit_after>package io.github.hidroh.materialistic;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.ShareActionProvider;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;

import javax.inject.Inject;

import io.github.hidroh.materialistic.data.FavoriteManager;
import io.github.hidroh.materialistic.data.ItemManager;

public class WebActivity extends BaseItemActivity {

    public static final String EXTRA_ITEM = WebActivity.class.getName() + ".EXTRA_ITEM";
    private ItemManager.WebItem mItem;
    private boolean mIsFavorite;
    private int mFavoriteOnResId;
    private int mFavoriteOffResId;
    @Inject FavoriteManager mFavoriteManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mItem = getIntent().getParcelableExtra(EXTRA_ITEM);
        if (mItem.getType() == ItemManager.WebItem.Type.comment) {
            setTitle(null);
        } else {
            setTitle(mItem.getDisplayedTitle());
        }
        getSupportFragmentManager()
                .beginTransaction()
                .add(R.id.content_frame,
                        WebFragment.instantiate(this, mItem),
                        WebFragment.class.getName())
                .commit();
        mFavoriteOnResId = AppUtils.getThemedResId(this, R.attr.themedMenuFavoriteOnDrawable);
        mFavoriteOffResId = AppUtils.getThemedResId(this, R.attr.themedMenuFavoriteOffDrawable);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_web, menu);
        ShareActionProvider shareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(
                menu.findItem(R.id.menu_share));
        shareActionProvider.setShareIntent(AppUtils.makeShareIntent(
{'fraction_non_alphanumeric': 0.08906570841889117, 'fraction_numerical': 0.001026694045174538, 'mean_word_length': 3.349330357142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3834698', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1079, 'n_words': 181}