Beispiel #1
0
 private void updateNetworkName(Network network, String custom_name) {
   if (network.customName() == null || !network.customName().equals(custom_name)) {
     network.setCustomName(custom_name);
     mNetworks.insertOrUpdate(network);
     ((TextView) mDetailView.findViewById(R.id.network_name))
         .setText(getString(R.string.devices_on) + " " + custom_name);
   }
 }
Beispiel #2
0
 public void showNetwork(int index, String network_id, int total) {
   try {
     mNetworkLines[index].setVisibility(View.VISIBLE);
     mNetworkIcons[index].setVisibility(View.VISIBLE);
     mNetworkIcons[index].setText(String.valueOf(total));
     mNetworkIcons[index].setTag(network_id);
     addNetworkLabel(mNetworkIcons[index], mNetworks.get(mRouterId, network_id).name());
   } catch (Exception ex) {
     Log.e(TAG, "showNetwork: " + ex.getMessage());
   }
 }