Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public View getView(final int position, View convertView, ViewGroup parent) {
- TextView title;
- TextView info;
- inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- View itemView = inflater.inflate(R.layout.listCell, parent, false);
- resultp = data.get(position);
- Log.w("position", Integer.toString(position));
- itemView.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- try {
- Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(resultp.get("url")));
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- context.startActivity(intent);
- } catch (ActivityNotFoundException e) {
- // No browser?
- }
- }
- });
- title = (TextView) itemView.findViewById(R.id.title);
- info = (TextView) itemView.findViewById(R.id.info);
- title.setText(resultp.get("title"));
- info.setText(resultp.get("info"));
- return itemView;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement