Back to project page Weather.
The source code is released under:
GNU General Public License
If you think the Android project Weather listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.imlongluo.weather.location; /*from www. ja va 2 s .co m*/ import com.imlongluo.weather.R; import android.content.Context; import android.content.res.Resources; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; /** * * @author longluo * ?????????GPS?????????????? */ public class GPSListAdapter extends BaseAdapter { /** * ???????????????????? */ private Context context; /** * ???????????????????????GPS???????? * @param context */ public GPSListAdapter(Context context) { this.context = context; } /** * ??????????????????? * @return ????? */ @Override public int getCount() { return 1; } /** * ?????????????? * @param position ???????? * @return ???? */ @Override public Object getItem(int position) { //????????????? Resources resource = context.getResources(); return resource.getString(R.string.locale_city); } /** * ???????????Id * @see android.widget.Adapter#getItemId(int) */ @Override public long getItemId(int position) { return 0; } /** * ??????? */ @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView == null) { LayoutInflater layout=LayoutInflater.from(context); convertView = layout.inflate(R.layout.gps, null); } return convertView; } }