I have a custom ListView, the code is below. Instead of writing:
"http://yoursite.com/image1.png" , "http://yoursite.com/image2.png".. and so one.
I want to store all the links in .txt files, and there, my device will read all the link. Is there anyway to do this??
package com.android.LazyList;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
public class OnePiece extends Activity {
ListView list;
LazyAdapter adapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LazyAdapter adapter=new LazyAdapter(this, mStrings);
final ListView list =(ListView)findViewById(R.id.list);
list.setAdapter(adapter);
}
static final String[] mStrings= new String[] {
"http://yoursite.com/image1.png" ,
"http://yoursite.com/image2.png" ,
"http://yoursite.com/image3.png" ,
"http://yoursite.com/image4.png" ,
"http://yoursite.com/image5.png" ,
"http://yoursite.com/image6.png" ,
};
}