I am a new developer in Android. I work with a soap object in my application to communicate with .net db services. I get the answer as strings from the database server. But my intention is that when I get the string from the db server as an answer, then imediatly treats it as a text view, so that I get the images encoded by string.how to get the imedialty response as view. I wrote the code as follows:
String xml="<spGetUserMessages><SearchLocation></SearchLocation><LoginUserID>"+Userid+"</LoginUserID></spGetUserMessages>";
I am sending the request as XML to the db server
The db server response in the list:
List<MessageClass> response=new ParseXml().getUserMessages(new Generic().getMessages(xml));
String messages=new String[response.size()];
for(int i=0;i<response.size();i++)
{
messages[i]=response.get(i).getmessage();
}
I wrote a base adapter class in this class, we have a method like getView, which I implemented as follows:
public View getView(int position, View convertView, ViewGroup parent) {
View vi=convertView;
if(convertView==null)
vi = inflater.inflate(R.layout.item, null);
TextView text=(TextView)vi.findViewById(R.id.text);;
ImageView image=(ImageView)vi.findViewById(R.id.image);
Log.v("rrrrrrrrrr", "rrrrrrrr"+messages[position]);
text.setText(messages[position]);
}
. , . , , , .