Ejemplo n.º 1
0
    @Override
    public void onClick() {
      AwesomeBarTabs.OnUrlOpenListener listener = getUrlListener();
      if (listener == null) return;

      String url = mCursor.getString(mCursor.getColumnIndexOrThrow(URLColumns.URL));
      String title = mCursor.getString(mCursor.getColumnIndexOrThrow(URLColumns.TITLE));
      listener.onUrlOpen(url, title);
    }
Ejemplo n.º 2
0
  public boolean handleItemClick(int groupPosition, int childPosition) {
    HistoryListAdapter adapter = getCursorAdapter();
    if (adapter == null) return false;

    @SuppressWarnings("unchecked")
    Map<String, Object> historyItem =
        (Map<String, Object>) adapter.getChild(groupPosition, childPosition);

    String url = (String) historyItem.get(URLColumns.URL);
    String title = (String) historyItem.get(URLColumns.TITLE);
    AwesomeBarTabs.OnUrlOpenListener listener = getUrlListener();
    if (!TextUtils.isEmpty(url) && listener != null) listener.onUrlOpen(url, title);

    return true;
  }
Ejemplo n.º 3
0
 @Override
 public void onClick() {
   AwesomeBarTabs.OnUrlOpenListener listener = getUrlListener();
   if (listener != null) listener.onSearch(mSearchEngine, mSearchTerm);
 }