Android Open Source - qshuttle_driver Host Setting Activity






From Project

Back to project page qshuttle_driver.

License

The source code is released under:

MIT License

If you think the Android project qshuttle_driver 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

/**
 * // w w  w .  j a  v a 2 s . co m
 */
package com.qshuttle.car;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

/**
 * @author wangpeifeng
 *
 */
public class HostSettingActivity extends Activity {
  
    /////////////////////////////////////////////////
    // PROPERTIES, PUBLIC
    /////////////////////////////////////////////////
  
  /////////////////////////////////////////////////
    // PROPERTIES, PROTECTED
    /////////////////////////////////////////////////

    /////////////////////////////////////////////////
    // PROPERTIES, PRIVATE
    /////////////////////////////////////////////////
    
  private Context context;
  
  private EditText     etHost,
              etPort,
              etSocketPort;
  
  
  private Button      btnSubmit;
  
    /////////////////////////////////////////////////
    // CONSTANTS
    /////////////////////////////////////////////////
  
    /////////////////////////////////////////////////
    // METHODS
    /////////////////////////////////////////////////
  

  /* (non-Javadoc)
   * @see android.app.Activity#onCreate(android.os.Bundle)
   */
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    
    context = this;
    
    setContentView(R.layout.network_setting);
    
    etHost = (EditText)findViewById(R.id.editTextHost);
    etHost.setText(PrefProxy.getHost(context));
    
    etPort = (EditText)findViewById(R.id.editTextPort);
    etPort.setText(PrefProxy.getPort(context));
    
    etSocketPort = (EditText)findViewById(R.id.editTextSocketPort);
//    etSocketPort.setText(""+PrefProxy.getSocketPort(context));
    
    btnSubmit = (Button)findViewById(R.id.buttonSubmit);
    btnSubmit.setOnClickListener(lsrButton);
  }
  
  private OnClickListener lsrButton = new OnClickListener(){

    public void onClick(View v) {
      // TODO Auto-generated method stub
      PrefProxy.setHost(context, etHost.getText().toString());
      PrefProxy.setPort(context, etPort.getText().toString());
//      PrefProxy.setSocketPort(context, Integer.parseInt(etSocketPort.getText().toString()));
      
      finish();
      
    }
    
  };
  
  

}




Java Source Code List

com.qshuttle.car.ActivityAddress.java
com.qshuttle.car.ActivityInfoRequest.java
com.qshuttle.car.ActivityMain.java
com.qshuttle.car.ActivityOfflineMap.java
com.qshuttle.car.DataOperator.java
com.qshuttle.car.DataProvider.java
com.qshuttle.car.DatabaseHelper.java
com.qshuttle.car.ExpandableListAdapter.java
com.qshuttle.car.GPSLocationOverlay.java
com.qshuttle.car.HostSettingActivity.java
com.qshuttle.car.ListAdapterAddress.java
com.qshuttle.car.ListAdapter.java
com.qshuttle.car.LongPressPopupOverlay.java
com.qshuttle.car.MapGestureDetectorOverlay.java
com.qshuttle.car.OverlayMapLocation.java
com.qshuttle.car.PassengerScheduleOverlay.java
com.qshuttle.car.PrefProxy.java
com.qshuttle.car.ThreadHttpPost.java
com.qshuttle.car.ThreadTimer.java
com.qshuttle.car.TimerCallBack.java
com.qshuttle.car.Timer.java
com.qshuttle.car.Utilities.java
com.qshuttle.car.WebApi.java