FileDocCategorySizeDatePackage
MostVisitedActivity.javaAPI DocAndroid 1.5 API6520Wed May 06 22:42:42 BST 2009com.android.browser

MostVisitedActivity

public class MostVisitedActivity extends android.app.ListActivity

Fields Summary
private MyAdapter
mAdapter
Constructors Summary
Methods Summary
private voidloadUrl(java.lang.String url, boolean newWindow)

        Intent intent = new Intent().setAction(url);
        if (newWindow) {
            Bundle b = new Bundle();
            b.putBoolean("new_window", true);
            intent.putExtras(b);
        }
        setResultToParent(RESULT_OK, intent);
        finish();
    
public voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        mAdapter = new MyAdapter();
        CombinedBookmarkHistoryActivity.getIconListenerSet(getContentResolver())
                .addListener(new IconReceiver());
        setListAdapter(mAdapter);
        ListView list = getListView();
        LayoutInflater factory = LayoutInflater.from(this);
        View v = factory.inflate(R.layout.empty_history, null);
        addContentView(v, new LayoutParams(LayoutParams.FILL_PARENT,
                LayoutParams.FILL_PARENT));
        list.setEmptyView(v);
    
protected voidonListItemClick(android.widget.ListView l, android.view.View v, int position, long id)

        TextView tv = (TextView) v.findViewById(R.id.url);
        String url = tv.getText().toString();
        loadUrl(url, false);
    
private voidsetResultToParent(int resultCode, android.content.Intent data)

        Activity a = getParent() == null ? this : getParent();
        a.setResult(resultCode, data);