Android Open Source - WIFI_Recovery Network Array Adapter






From Project

Back to project page WIFI_Recovery.

License

The source code is released under:

GNU General Public License

If you think the Android project WIFI_Recovery 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.vorsk.wifirecovery;
/*w  ww  . jav  a 2  s  . c om*/
import com.vorsk.wifirecovery.network.Network;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class NetworkArrayAdapter extends ArrayAdapter<Network> {

  private final Context context;
  private final Network[] values;

  public NetworkArrayAdapter(Context context, Network[] values) {
    super(context, R.layout.rowlayout, values);
    this.context = context;
    this.values = values;
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    LayoutInflater inflater = (LayoutInflater) context
        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    View rowView = inflater.inflate(R.layout.rowlayout, parent, false);

    TextView textView = (TextView) rowView.findViewById(R.id.name);
    TextView securityText = (TextView) rowView.findViewById(R.id.security);
    ImageView imageView = (ImageView) rowView.findViewById(R.id.icon);

    textView.setText(values[position].getSSID()); // set the text
    imageView.setImageResource(values[position].getIcon()); // set the image

    securityText.setText(values[position].getSecurityName());

    return rowView;
  }

}




Java Source Code List

com.vorsk.wifirecovery.BackupActivity.java
com.vorsk.wifirecovery.BackupTask.java
com.vorsk.wifirecovery.HomeActivity.java
com.vorsk.wifirecovery.NetworkArrayAdapter.java
com.vorsk.wifirecovery.ParserTask.java
com.vorsk.wifirecovery.network.EAPNetwork.java
com.vorsk.wifirecovery.network.Network.java
com.vorsk.wifirecovery.network.OpenNetwork.java
com.vorsk.wifirecovery.network.WEPNetwork.java
com.vorsk.wifirecovery.network.WPANetwork.java