Example usage for android.view Window FEATURE_INDETERMINATE_PROGRESS

List of usage examples for android.view Window FEATURE_INDETERMINATE_PROGRESS

Introduction

In this page you can find the example usage for android.view Window FEATURE_INDETERMINATE_PROGRESS.

Prototype

int FEATURE_INDETERMINATE_PROGRESS

To view the source code for android.view Window FEATURE_INDETERMINATE_PROGRESS.

Click Source Link

Document

Flag for indeterminate progress.

Usage

From source file:de.uni.stuttgart.informatik.ToureNPlaner.UI.Activities.MapActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

    setContentView(R.layout.mapscreen);/*  www  .j av  a2  s. c  o m*/

    if (savedInstanceState != null) {
        mapView.setCenter((GeoPoint) savedInstanceState.get("Center"));
        // TODO restore zoom
    }
}

From source file:org.mariotaku.twidere.activity.support.BrowserActivity.java

@Override
protected void onCreate(final Bundle savedInstanceState) {
    supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR);
    super.onCreate(savedInstanceState);
    final ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }/*ww  w . jav a2 s .c  om*/
    mUri = getIntent().getData();
    if (mUri == null) {
        Toast.makeText(this, R.string.error_occurred, Toast.LENGTH_SHORT).show();
        finish();
        return;
    }
    final FragmentTransaction ft = getFragmentManager().beginTransaction();
    final Fragment fragment = Fragment.instantiate(this, BaseWebViewFragment.class.getName());
    final Bundle bundle = new Bundle();
    bundle.putString(EXTRA_URI, mUri.toString());
    fragment.setArguments(bundle);
    ft.replace(android.R.id.content, fragment);
    ft.commit();
}

From source file:com.net.rmopenmenu.MainActivity.java

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

    setContentView(R.layout.fragment_tabs_pager);

    mTabHost = (TabHost) findViewById(android.R.id.tabhost);
    mTabHost.setup();// w  w w  . j a  va2  s  . c  om

    mViewPager = (ViewPager) findViewById(R.id.pager);

    mTabsAdapter = new TabsAdapter(this, mTabHost, mViewPager);

    final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);

    Bundle b1 = new Bundle();
    b1.putBoolean("menu", true);

    Bundle b2 = new Bundle();
    b2.putBoolean("menu", false);

    mTabsAdapter.addTab(mTabHost.newTabSpec("menu").setIndicator("Menu"), MenuFragment.class, b1);
    mTabsAdapter.addTab(mTabHost.newTabSpec("restaurant").setIndicator("Restaurant"), MenuFragment.class, b2);
    if (savedInstanceState != null) {
        mTabHost.setCurrentTabByTag(savedInstanceState.getString("tab"));
    }

    // Acquire a reference to the system Location Manager
    locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);

    // Define a listener that responds to location updates
    locationListener = new LocationListener() {
        public void onStatusChanged(String provider, int status, Bundle extras) {
        }

        public void onProviderEnabled(String provider) {
        }

        public void onProviderDisabled(String provider) {
        }

        @Override
        public void onLocationChanged(Location location) {
            SharedPreferences.Editor editor = prefs.edit();

            editor.putInt("lat", (int) (location.getLatitude() * 1000000));
            editor.putInt("lon", (int) (location.getLongitude() * 1000000));

            editor.commit();
        }
    };

    // Register the listener with the Location Manager to receive location updates
    locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
    locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);
}

From source file:me.senwang.newpdademo.MainActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    setContentView(R.layout.activity_main);

    String test = "111";
    boolean testb = test.equals(null);

    mSidEdit = (EditText) findViewById(R.id.sid_edit);
    mUserNameEdit = (EditText) findViewById(R.id.user_name_edit);
    mPasswordEdit = (EditText) findViewById(R.id.password_edit);
    mTextView = (TextView) findViewById(R.id.text);

    CookieManager cm = new CookieManager();
    CookieHandler.setDefault(cm);
}

From source file:org.pyload.android.client.components.FragmentTabsPager.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (!pyLoadApp.isActionBarAvailable()) {
        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    }/*from   w w  w . j a v a  2  s  .c  o m*/

    setContentView(R.layout.fragment_tabs_pager);
    mTabHost = (TabHost) findViewById(android.R.id.tabhost);
    mTabHost.setup();

    mViewPager = (ViewPager) findViewById(R.id.pager);

    mTabsAdapter = new TabsAdapter(this, mTabHost, mViewPager);

    if (savedInstanceState != null) {
        mTabHost.setCurrentTabByTag(savedInstanceState.getString("tab"));
    }
}

From source file:net.henriquerocha.android.codebits.LoginActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    setContentView(R.layout.activity_login);
    setProgressBarIndeterminateVisibility(false);
    this.context = this;

    this.tvEmail = (TextView) findViewById(R.id.et_email);
    this.tvPassword = (TextView) findViewById(R.id.et_password);
    this.tvLoginFailed = (TextView) findViewById(R.id.tv_login_failed);

    SharedPreferences settings = getSharedPreferences(Constants.LOGIN_INFO, 0);
    this.tvEmail.setText(settings.getString(Constants.KEY_EMAIL, ""));
    this.tvPassword.setText(settings.getString(Constants.KEY_PASSWORD, ""));
}

From source file:com.netatmo.weatherstation.sample.LoginActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_login);
    setResult(RESULT_CANCELED);/*  www  .  j  a  v  a 2 s.c o m*/

    mEmailView = (EditText) findViewById(R.id.email);

    mPasswordView = (EditText) findViewById(R.id.password);
    mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
        @Override
        public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
            if (id == R.id.login || id == EditorInfo.IME_NULL) {
                attemptLogin();
                return true;
            }
            return false;
        }
    });

    mSignInButtonView = (Button) findViewById(R.id.sign_in_button);
    mSignInButtonView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            attemptLogin();
        }
    });
}

From source file:com.loadsensing.app.LoginActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    super.onCreate(savedInstanceState);

    // load up the layout
    setContentView(R.layout.login);//w ww  .ja  v  a 2s . c o  m

    SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this);

    // Set "Remember username and password" 1/0 if checked/unchecked
    CheckBox rememberUserPassword = (CheckBox) findViewById(R.id.remember_user_password);
    rememberUserPassword.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            if (getSharedPreference("saveusername").equals("1")) {
                setSharedPreference("saveusername", "0");
            } else {
                setSharedPreference("saveusername", "1");
            }
        }
    });

    // Restore preferences if "Remember username and password" is checked
    if (getSharedPreference("saveusername").equals("1")) {

        rememberUserPassword.setChecked(true);
        EditText editText = (EditText) findViewById(R.id.txt_username);
        editText.setText(getSharedPreference("login"));
        editText = (EditText) findViewById(R.id.txt_password);
        editText.setText(getSharedPreference("password"));
    }

    // get the button resource in the xml file and assign it to a local
    // variable of type Button
    Button login = (Button) findViewById(R.id.login_button);
    login.setOnClickListener(this);

    if (settings.getBoolean("autologin", false)) {
        login.performClick();
    }

    // Delete session
    setSharedPreference("session", "");

}

From source file:net.reichholf.dreamdroid.activities.SimpleFragmentActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    if (!mThemeSet)
        DreamDroid.setTheme(this);
    super.onCreate(savedInstanceState);
    supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

    if (getSupportActionBar() != null) {
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        setSupportProgressBarIndeterminateVisibility(false);
    }/*from   ww w. j  a v  a2s  .c o m*/

    mFragment = null;
    boolean initFragment = true;
    if (savedInstanceState != null) {
        mFragment = getSupportFragmentManager().findFragmentById(R.id.content);
        initFragment = false;
    }

    initViews(initFragment);
}

From source file:netatmowear.mugitek.com.netatmowear.LoginActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_login);
    setResult(RESULT_CANCELED);//from w w  w .  j  av a  2  s .co  m

    mEmailView = (EditText) findViewById(R.id.email);

    mPasswordView = (EditText) findViewById(R.id.password);
    mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
        @Override
        public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
            if (id == R.id.login || id == EditorInfo.IME_NULL) {
                attemptLogin();
                return true;
            }
            return false;
        }
    });

    mSignInButtonView = (Button) findViewById(R.id.sign_in_button);
    mSignInButtonView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            attemptLogin();
        }
    });
}