app/src/main/java/com/geekyouup/android/ustopwatch/UltimateStopwatchActivity.java
/**
     * Called when the activity is first created.
     */
Called when the activity is first created.
Called when the activity is first created .
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        getWindow().setBackgroundDrawable(null);
        Toolbar tb = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(tb);
        setTitle("");
        mSoundManager = SoundManager.getInstance(this);
        mViewPager = (ViewPager) findViewById(R.id.viewpager);
        mViewPager.setOffscreenPageLimit(2);
        setupTabs();
        mPowerMan = (PowerManager) getSystemService(Context.POWER_SERVICE);
        setVolumeControlStream(AudioManager.STREAM_MUSIC);
        int screenSize = getResources().getConfiguration().screenLayout
                & Configuration.SCREENLAYOUT_SIZE_MASK;
        if (screenSize == Configuration.SCREENLAYOUT_SIZE_SMALL) {
            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        }
        if (getIntent() != null && getIntent().getBooleanExtra(AlarmUpdater.INTENT_EXTRA_LAUNCH_COUNTDOWN, false)) {
            mViewPager.setCurrentItem(2);
        }
    }
@ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R . layout . main ) ; getWindow ( ) . setBackgroundDrawable ( null ) ; Toolbar tb = ( Toolbar ) findViewById ( R . id . toolbar ) ; setSupportActionBar ( tb ) ; setTitle ( "" ) ; mSoundManager = SoundManager . getInstance ( this ) ; mViewPager = ( ViewPager ) findViewById ( R . id . viewpager ) ; mViewPager . setOffscreenPageLimit ( 2 ) ; setupTabs ( ) ; mPowerMan = ( PowerManager ) getSystemService ( Context . POWER_SERVICE ) ; setVolumeControlStream ( AudioManager . STREAM_MUSIC ) ; int screenSize = getResources ( ) . getConfiguration ( ) . screenLayout & Configuration . SCREENLAYOUT_SIZE_MASK ; if ( screenSize == Configuration . SCREENLAYOUT_SIZE_SMALL ) { setRequestedOrientation ( ActivityInfo . SCREEN_ORIENTATION_PORTRAIT ) ; } if ( getIntent ( ) != null && getIntent ( ) . getBooleanExtra ( AlarmUpdater . INTENT_EXTRA_LAUNCH_COUNTDOWN , false ) ) { mViewPager . setCurrentItem ( 2 ) ; } }
Called when the activity is first created.
Called when the activity is first created .
// stop landscape on QVGA/HVGA //If launched from Countdown notification then goto countdown clock directly