Click here to Skip to main content
15,899,026 members
Home / Discussions / Android
   

Android

 
AnswerRe: What kind of suggestions can you give to a beginner in android app developement? Pin
Kornfeld Eliyahu Peter10-Jan-15 20:23
professionalKornfeld Eliyahu Peter10-Jan-15 20:23 
GeneralRe: What kind of suggestions can you give to a beginner in android app developement? Pin
Member 1036419227-Jan-15 1:05
Member 1036419227-Jan-15 1:05 
GeneralRe: What kind of suggestions can you give to a beginner in android app developement? Pin
Richard MacCutchan10-Jan-15 21:42
mveRichard MacCutchan10-Jan-15 21:42 
QuestionMp3 Cutter Android Coding Pin
Ranjithkumar .8-Jan-15 21:44
Ranjithkumar .8-Jan-15 21:44 
AnswerRe: Mp3 Cutter Android Coding Pin
Richard MacCutchan9-Jan-15 4:05
mveRichard MacCutchan9-Jan-15 4:05 
QuestionAndroid crash when app is high score menu opened Pin
Member 113605017-Jan-15 20:40
Member 113605017-Jan-15 20:40 
AnswerRe: Android crash when app is high score menu opened Pin
Richard MacCutchan7-Jan-15 23:00
mveRichard MacCutchan7-Jan-15 23:00 
GeneralRe: Android crash when app is high score menu opened Pin
Member 113605018-Jan-15 0:01
Member 113605018-Jan-15 0:01 
RevHighScoreAdapter.java

Java
package uk.co.flumeland.reversi;

import java.util.ArrayList;
import java.lang.String;

import android.app.Activity;
import android.content.Context;
import android.net.Uri;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class RevHighScoreAdapter extends ArrayAdapter {

    private Score[] scores;
    private Context context;

// Constructor
public RevHighScoreAdapter(Context context, Score[] score){
        super(context, 0);
        scores = score;
        this.context = context;
        }


    @Override
    public int getCount() {
        // length of list
        return scores.length;
    }

    @Override
    public Object getItem(int position) {
        // length of list
        return position;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View row = convertView;
        Log.i("Reversi, RevHSCustAd getView called", "position = " + position );

        if (row == null) {
            LayoutInflater inflater = ((Activity) context).getLayoutInflater();
            row = inflater.inflate(R.layout.high_scores_listview_row, parent, false);
        }
        TextView nameTV = (TextView) row.findViewById(R.id.hs_player_name_lv);
        ImageView photoIV = (ImageView) row.findViewById(R.id.hs_player_image_lv);
        TextView scoreTV = (TextView) row.findViewById(R.id.hs_score_lv);
        Log.i("Reversi, RevHSCustAd getView called", "position = " + position );

        //if (scores[position].getPhotolink() != null) {
            //photoIV.setImageURI(Uri.parse(scores[position].getPhotolink()));
        //} else {
            //photoIV.setImageResource(R.drawable.social_add_person);
        //}
            nameTV.setText(scores[position].getName());
            Log.i("Reversi, RevHSCustAd getView called", "position = " + position );
            scoreTV.setText(String.valueOf(scores[position].getScore()));

        return row;
    }
}


Error code? How do I fix it ?
C#
nameTV.setText(scores[position].getName());
            Log.i("Reversi, RevHSCustAd getView called", "position = " + position );
            scoreTV.setText(String.valueOf(scores[position].getScore()));

GeneralRe: Android crash when app is high score menu opened Pin
Richard MacCutchan8-Jan-15 0:09
mveRichard MacCutchan8-Jan-15 0:09 
GeneralRe: Android crash when app is high score menu opened Pin
Member 113605018-Jan-15 0:12
Member 113605018-Jan-15 0:12 
GeneralRe: Android crash when app is high score menu opened Pin
Richard MacCutchan8-Jan-15 0:36
mveRichard MacCutchan8-Jan-15 0:36 
GeneralRe: Android crash when app is high score menu opened Pin
Member 113605018-Jan-15 1:03
Member 113605018-Jan-15 1:03 
GeneralRe: Android crash when app is high score menu opened Pin
Gonzoox5-Mar-15 4:38
Gonzoox5-Mar-15 4:38 
AnswerRe: Android crash when app is high score menu opened Pin
David Crow8-Jan-15 3:34
David Crow8-Jan-15 3:34 
QuestionAndroid USB Mode Pin
Sarita S7-Jan-15 0:21
Sarita S7-Jan-15 0:21 
Questionksoap2: error call webservice Pin
nvpopovich1-Jan-15 23:20
nvpopovich1-Jan-15 23:20 
QuestionAndroid USB Mode Pin
Sarita S25-Dec-14 23:21
Sarita S25-Dec-14 23:21 
AnswerRe: Android USB Mode Pin
Richard MacCutchan26-Dec-14 22:29
mveRichard MacCutchan26-Dec-14 22:29 
AnswerRe: Android USB Mode Pin
Sarita S30-Dec-14 23:50
Sarita S30-Dec-14 23:50 
AnswerRe: Android USB Mode Pin
Member 117320901-Jun-15 0:09
Member 117320901-Jun-15 0:09 
QuestionAndroid application Pin
APURBA RAM24-Dec-14 3:00
APURBA RAM24-Dec-14 3:00 
JokeRe: Android application Pin
APURBA RAM24-Dec-14 3:02
APURBA RAM24-Dec-14 3:02 
AnswerRe: Android application Pin
Peter Leow24-Dec-14 3:55
professionalPeter Leow24-Dec-14 3:55 
AnswerRe: Android application Pin
Dominic Burford30-Dec-14 5:55
professionalDominic Burford30-Dec-14 5:55 
Questionhow to Insert contacts get from vcf file directly to Phonebook in android Pin
vivek.chauhan200922-Dec-14 17:48
vivek.chauhan200922-Dec-14 17:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.