Network shield case


/ **
* test network status
* /
networkButton.setOnClickListener (new new OnClickNetworkListener (http://www.my516.com) {
/ **
logic * from the abstract methods defined implemented, there is a network for performing a mainly after
* /
@ override
public void onNetworkClick (View V) {
Toast.makeText (mContext, "the current network equipment, subsequent operations are performed ...", Toast.LENGTH_LONG) the .Show ();
}

/ **
* custom implementation of the abstract method, the main device for performing the current logical network after no
* /
@Override
public void onNoNetworkClick (View V) {
Toast.makeText (mContext, "network error ...", Toast.LENGTH_LONG) the .Show ();
}
});

 

Guess you like

Origin www.cnblogs.com/hyhy904/p/11408514.html