Android Open Source - mtgtools Counter Activity






From Project

Back to project page mtgtools.

License

The source code is released under:

GNU General Public License

If you think the Android project mtgtools listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package pe.apiconz.apps.mtgtools;
//from  w w  w .  j av a2  s.  co m
import android.app.Activity;
import android.os.Bundle;
import android.widget.NumberPicker;

public class CounterActivity extends Activity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    setContentView(R.layout.activity_counter);
    super.onCreate(savedInstanceState);

    NumberPicker numberPicker = (NumberPicker) findViewById(R.id.numberPicker1);

    String[] numberArray = new String[60];

    populateNumberArray(numberArray);

    numberPicker.setMinValue(0);
    numberPicker.setMaxValue(numberArray.length - 1);
    numberPicker.setDisplayedValues(numberArray);
    numberPicker.setValue(40);
    numberPicker
        .setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);

    getActionBar().setDisplayHomeAsUpEnabled(true);
    
  }
  

  private void populateNumberArray(String[] numberArray) {
    int count = -20;

    for (int i = 0; i < numberArray.length; i++) {
      numberArray[i] = "" + count;
      count++;
    }
  }
}




Java Source Code List

pe.apiconz.apps.mtgtools.AboutMeActivity.java
pe.apiconz.apps.mtgtools.BDHelper.java
pe.apiconz.apps.mtgtools.CardDetailActivity.java
pe.apiconz.apps.mtgtools.CardListActivity.java
pe.apiconz.apps.mtgtools.Card.java
pe.apiconz.apps.mtgtools.CounterActivity.java
pe.apiconz.apps.mtgtools.DownloadImageTask.java
pe.apiconz.apps.mtgtools.ListCardAdapter.java
pe.apiconz.apps.mtgtools.MenuActivity.java
pe.apiconz.apps.mtgtools.SplashScreen.java