Search in sources :

Example 6 with FadingActionBarHelper

use of com.manuelpeinado.fadingactionbar.extras.actionbarcompat.FadingActionBarHelper in project FadingActionBar by ManuelPeinado.

the class WebViewActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FadingActionBarHelper helper = new FadingActionBarHelper().actionBarBackground(R.drawable.ab_background).headerLayout(R.layout.header).contentLayout(R.layout.activity_webview);
    setContentView(helper.createView(this));
    helper.initActionBar(this);
    WebView webView = (WebView) findViewById(R.id.webView);
    webView.setWebViewClient(new WebViewClient());
    webView.loadUrl("http://en.wikipedia.org/wiki/New_York_City");
}
Also used : FadingActionBarHelper(com.manuelpeinado.fadingactionbar.extras.actionbarcompat.FadingActionBarHelper) WebView(android.webkit.WebView) WebViewClient(android.webkit.WebViewClient)

Example 7 with FadingActionBarHelper

use of com.manuelpeinado.fadingactionbar.extras.actionbarcompat.FadingActionBarHelper in project FadingActionBar by ManuelPeinado.

the class HeaderOverlayActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FadingActionBarHelper helper = new FadingActionBarHelper().actionBarBackground(R.drawable.ab_background).headerLayout(R.layout.header).contentLayout(R.layout.activity_listview).headerOverlayLayout(R.layout.header_overlay);
    setContentView(helper.createView(this));
    helper.initActionBar(this);
    ListView listView = (ListView) findViewById(android.R.id.list);
    ArrayList<String> items = loadItems(R.raw.nyc_sites);
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items);
    listView.setAdapter(adapter);
}
Also used : FadingActionBarHelper(com.manuelpeinado.fadingactionbar.extras.actionbarcompat.FadingActionBarHelper) ListView(android.widget.ListView) ArrayAdapter(android.widget.ArrayAdapter)

Example 8 with FadingActionBarHelper

use of com.manuelpeinado.fadingactionbar.extras.actionbarcompat.FadingActionBarHelper in project FadingActionBar by ManuelPeinado.

the class ScrollViewActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FadingActionBarHelper helper = new FadingActionBarHelper().actionBarBackground(R.drawable.ab_background).headerLayout(R.layout.header).contentLayout(R.layout.activity_scrollview);
    setContentView(helper.createView(this));
    helper.initActionBar(this);
}
Also used : FadingActionBarHelper(com.manuelpeinado.fadingactionbar.extras.actionbarcompat.FadingActionBarHelper)

Aggregations

FadingActionBarHelper (com.manuelpeinado.fadingactionbar.extras.actionbarcompat.FadingActionBarHelper)8 ArrayAdapter (android.widget.ArrayAdapter)2 ListView (android.widget.ListView)2 WebView (android.webkit.WebView)1 WebViewClient (android.webkit.WebViewClient)1