checkStaticIP = (CheckBox) findViewById(R.id.checkStaticIP);
checkStaticIP.setChecked(Settings.System.getInt(contentResolver,
ETHERNET_USE_STATIC_IP, 0) != 0);
checkStaticIP
.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
android.provider.Settings.System.putInt(
contentResolver, ETHERNET_USE_STATIC_IP,
isChecked ? 1 : 0);
}
});
// GET static IP
editIPAddress = (EditText) findViewById(R.id.editIPAddress);
editIPAddress.setText(Settings.System.getString(contentResolver,
ETHERNET_STATIC_IP));
// GET static gateway
editGateway = (EditText) findViewById(R.id.editGateway);
editGateway.setText(Settings.System.getString(contentResolver,
ETHERNET_STATIC_GATEWAY));
// GET static n