Search in sources :

Example 91 with ActionBar

use of android.app.ActionBar in project circular-progress-button by dmytrodanylyk.

the class Sample1Activity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ac_sample_1);
    ActionBar actionBar = getActionBar();
    if (actionBar != null) {
        actionBar.setTitle(R.string.IndeterminateProgressSample);
    }
    final CircularProgressButton circularButton1 = (CircularProgressButton) findViewById(R.id.circularButton1);
    circularButton1.setIndeterminateProgressMode(true);
    circularButton1.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            if (circularButton1.getProgress() == 0) {
                circularButton1.setProgress(50);
            } else if (circularButton1.getProgress() == 100) {
                circularButton1.setProgress(0);
            } else {
                circularButton1.setProgress(100);
            }
        }
    });
    final CircularProgressButton circularButton2 = (CircularProgressButton) findViewById(R.id.circularButton2);
    circularButton2.setIndeterminateProgressMode(true);
    circularButton2.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            if (circularButton2.getProgress() == 0) {
                circularButton2.setProgress(50);
            } else if (circularButton2.getProgress() == -1) {
                circularButton2.setProgress(0);
            } else {
                circularButton2.setProgress(-1);
            }
        }
    });
}
Also used : CircularProgressButton(com.dd.CircularProgressButton) View(android.view.View) ActionBar(android.app.ActionBar)

Example 92 with ActionBar

use of android.app.ActionBar in project circular-progress-button by dmytrodanylyk.

the class Sample2Activity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ac_sample_2);
    ActionBar actionBar = getActionBar();
    if (actionBar != null) {
        actionBar.setTitle(R.string.IntegerProgressSample);
    }
    final CircularProgressButton circularButton1 = (CircularProgressButton) findViewById(R.id.circularButton1);
    circularButton1.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            if (circularButton1.getProgress() == 0) {
                simulateSuccessProgress(circularButton1);
            } else {
                circularButton1.setProgress(0);
            }
        }
    });
    final CircularProgressButton circularButton2 = (CircularProgressButton) findViewById(R.id.circularButton2);
    circularButton2.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            if (circularButton2.getProgress() == 0) {
                simulateErrorProgress(circularButton2);
            } else {
                circularButton2.setProgress(0);
            }
        }
    });
}
Also used : CircularProgressButton(com.dd.CircularProgressButton) View(android.view.View) ActionBar(android.app.ActionBar)

Example 93 with ActionBar

use of android.app.ActionBar in project AndroidSwipeLayout by daimajia.

the class RecyclerViewExample method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.recyclerview);
    recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        ActionBar actionBar = getActionBar();
        if (actionBar != null) {
            actionBar.setTitle("RecyclerView");
        }
    }
    // Layout Managers:
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    // Item Decorator:
    recyclerView.addItemDecoration(new DividerItemDecoration(getResources().getDrawable(R.drawable.divider)));
    recyclerView.setItemAnimator(new FadeInLeftAnimator());
    // Adapter:
    String[] adapterData = new String[] { "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming" };
    mDataSet = new ArrayList<String>(Arrays.asList(adapterData));
    mAdapter = new RecyclerViewAdapter(this, mDataSet);
    ((RecyclerViewAdapter) mAdapter).setMode(Attributes.Mode.Single);
    recyclerView.setAdapter(mAdapter);
    /* Listeners */
    recyclerView.setOnScrollListener(onScrollListener);
}
Also used : FadeInLeftAnimator(jp.wasabeef.recyclerview.animators.FadeInLeftAnimator) RecyclerViewAdapter(com.daimajia.swipedemo.adapter.RecyclerViewAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(com.daimajia.swipedemo.adapter.util.DividerItemDecoration) ActionBar(android.app.ActionBar)

Example 94 with ActionBar

use of android.app.ActionBar in project TextureViewDemo by dalinaum.

the class Canvas2Activity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.content);
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    final AdView adView = new AdView(this, AdSize.SMART_BANNER, "a1513f5a0d88abc");
    final FrameLayout adContainer = (FrameLayout) findViewById(R.id.adContainer);
    adContainer.addView(adView);
    AdRequest adRequest = new AdRequest();
    // adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
    adView.loadAd(adRequest);
    mTextureView = (TextureView) findViewById(R.id.texture_view);
    mTextureView.setSurfaceTextureListener(new CanvasListener());
    mTextureView.setOpaque(false);
}
Also used : AdRequest(com.google.ads.AdRequest) FrameLayout(android.widget.FrameLayout) AdView(com.google.ads.AdView) ActionBar(android.app.ActionBar)

Example 95 with ActionBar

use of android.app.ActionBar in project TextureViewDemo by dalinaum.

the class CanvasActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.content);
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    final AdView adView = new AdView(this, AdSize.SMART_BANNER, "a1513f5a0d88abc");
    final FrameLayout adContainer = (FrameLayout) findViewById(R.id.adContainer);
    adContainer.addView(adView);
    AdRequest adRequest = new AdRequest();
    // adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
    adView.loadAd(adRequest);
    mTextureView = (TextureView) findViewById(R.id.texture_view);
    mTextureView.setSurfaceTextureListener(new CanvasListener());
    mTextureView.setOpaque(false);
}
Also used : AdRequest(com.google.ads.AdRequest) FrameLayout(android.widget.FrameLayout) AdView(com.google.ads.AdView) ActionBar(android.app.ActionBar)

Aggregations

ActionBar (android.app.ActionBar)158 View (android.view.View)37 Intent (android.content.Intent)19 AdapterView (android.widget.AdapterView)11 TextView (android.widget.TextView)11 ListView (android.widget.ListView)9 SharedPreferences (android.content.SharedPreferences)8 Uri (android.net.Uri)7 ArrayAdapter (android.widget.ArrayAdapter)7 FrameLayout (android.widget.FrameLayout)7 SpannableString (android.text.SpannableString)6 BitmapRegionTileSource (com.android.photos.BitmapRegionTileSource)6 GridLayoutManager (android.support.v7.widget.GridLayoutManager)5 RecyclerView (android.support.v7.widget.RecyclerView)5 CircularProgressButton (com.dd.CircularProgressButton)5 CircularProgressButton (com.marshalchen.common.uimodule.circularProgressButton.CircularProgressButton)5 SuppressLint (android.annotation.SuppressLint)4 Bundle (android.os.Bundle)4 ViewPager (android.support.v4.view.ViewPager)4 MenuInflater (android.view.MenuInflater)4