Android Open Source - DialQuick_Android Dial Call Dialog Activity






From Project

Back to project page DialQuick_Android.

License

The source code is released under:

GNU General Public License

If you think the Android project DialQuick_Android 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 com.blogspot.techzealous.ui;
/*from  w  w  w.  jav  a2  s.co  m*/
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.Toast;

import com.blogspot.techzealous.dialquick.DialQuickConstants;
import com.blogspot.techzealous.dialquick.R;

public class DialCallDialogActivity extends Activity {

  private Button buttonOk;
  private RadioButton radioButtonDial;
  private RadioButton radioButtonCall;
  private SharedPreferences prefs;
  
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    setContentView(R.layout.dialorcall);
    
    prefs = PreferenceManager.getDefaultSharedPreferences(this);
    buttonOk = (Button) findViewById(R.id.buttonDialCallOK);
    radioButtonDial = (RadioButton) findViewById(R.id.radioDial);
    radioButtonCall = (RadioButton) findViewById(R.id.radioCall);
    
    if(prefs.getBoolean(DialQuickConstants.PREF_CALL, false)) {
      radioButtonCall.setChecked(true);
    } else {
      radioButtonDial.setChecked(true);
    }
    
    buttonOk.setOnClickListener(new OnClickListener() {
      public void onClick(View v) {
        prefs.edit().putBoolean(DialQuickConstants.PREF_CALL, radioButtonCall.isChecked()).commit();
        Toast.makeText(DialCallDialogActivity.this, DialQuickConstants.MODE_SET, Toast.LENGTH_SHORT).show();
      }
    });
  }
}




Java Source Code List

com.blogspot.techzealous.dialquick.DialQuickConstants.java
com.blogspot.techzealous.ui.ContactsActivity.java
com.blogspot.techzealous.ui.DQEula.java
com.blogspot.techzealous.ui.DQWellcome.java
com.blogspot.techzealous.ui.DialCallDialogActivity.java
com.blogspot.techzealous.ui.MainActivity.java
com.blogspot.techzealous.ui.SetupPhoneActivity.java