안녕하세요 안드로이드 진로를 잡고 공부하고있는 학생입니다.
안드로이드 <--> 웹서버 통신을 이용해 이미지 파일과 글을 읽어와 리스트뷰에 뿌려주는 앱을 포트폴리오로 만들려고 개발중에 시험으로 디비에 데이터를 2개 저장하고 테스트 해봤는데 정상적으로 구동되서 데이터를 10 개정도 넣고 돌려보니 이미지들이 자기 마음대로 바꼇다가 다시 정상적인 이미지로 돌아오고 스피너(지역)또한 동작하질않습니다 . 고수님들 도와주세요
코드가 짤려서 댓글에 이어서 올렷습니다 .
public class MainActivity extends AppCompatActivity { Handler handler = new Handler(); Spinner location1, location2; Button search; ArrayList<String> arrayList, arrayList2; ArrayAdapter<String> arrayAdapter, arrayAdapter2; TextView test; public String location; public String location2_idr; public String clickhtml="http://211.226.100.190:8080/db/nemotest.jsp"; public String type; public String[] address; public String[] name; public String threadClose; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); locationThread locationThread = new locationThread(); locationThread.start(); myThread thread = new myThread(); thread.start(); search=(Button)findViewById(R.id.serach); search.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(type !=null) { clickhtml = "http://211.226.100.190:8080/db/nemotest.jsp?location2_id=" + location2_idr+"&type="+type; Toast.makeText(getApplicationContext(),clickhtml,Toast.LENGTH_LONG).show(); myThread thread = new myThread(); thread.start(); } else { clickhtml = "http://211.226.100.190:8080/db/nemotest.jsp?location2_id=" + location2_idr; Toast.makeText(getApplicationContext(),clickhtml,Toast.LENGTH_LONG).show(); myThread thread = new myThread(); thread.start(); } } }); }