에 추가 할 수 있습니다. toString() 메소드로 링크 버튼을 추가 한 다음 listview에 추가하는 방법을 제안합니다. 버튼을 클릭하면 새로운 활동이 시작됩니다. 제발 제안 해주세요. 나는 고치고있다.우리는 toString() with Dynamic Link 버튼을 android
-3
A
답변
0
당신은 ... listactivity 클래스를 확장하여이 작업을 수행 할 수 있습니다
은 ... 클래스를 확장하고 listitemclick() 함수를 오버라이드 (override)
하고 있다는 점에서
...하는 것은 새로운 시작 활동 ... 의도 i = 새로운 의도 (this, yourclass.class); startActivity (i);
1
글쎄, 당신은 첫째로, 당신의 목록보기에 대한 항목 레이아웃을 만들 것입니다 : 여기
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Show link1"
/>
</LinearLayout>
이 레이아웃의 ListView에 있습니다 :
<ListView
android:id="@+id/ListView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
활동 파일에서
myAdapter adapter = new myAdapter(
context, R.layout.your_list_item, buttonStrings);
ListView listView = (ListView) findViewById(R.id.ListView1);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// do your logic here with position or id
Intent myIntent = new Intent(currentActivity.this, nextActivity.class);
startActivity(myIntent);
}
});
MyAdapter
에서 목록 항목을 재생할 수 있습니다 (이 경우 버튼에 이름을 지정하십시오)
관련 문제
- 1. Android : ListView with dynamic colors
- 2. Selenium link with class
- 3. Wrapp link with strong()
- 4. jqGrid with dynamic colModel?
- 5. Dynamic UITableViewCell with UIWebView
- 6. RecyclerView with Dynamic Edittext
- 7. OrderBy with Dynamic Linq
- 8. NHibernate.QueryException with dynamic-component
- 9. Dynamic Instrumentation with Clang
- 10. android edittext dynamic list
- 11. Firebase.google.com Firebase Dynamic Link in iOS (Swift)
- 12. Android + toString
- 13. llvm-link with external libraries
- 14. jQuery clickable link with setInterval
- 15. Riak Link store with java
- 16. 레일스 update_attributes with dynamic hash
- 17. jquery dynamic stracture with Equq
- 18. jQuery Mobile Link/Button with Click
- 19. knockout.js with "binding and dynamic html
- 20. android link dex files
- 21. Dynamic ImageView in android
- 22. mailto with subject with android
- 23. 플래시 배너 advert with html link
- 24. cmake link with libboost_python-py32.so libboost_python.so
- 25. html + css dynamic width with overflows
- 26. Dynamic Subclassing과 ActiveRecord establish_connection with PostgreSQL 데이터베이스
- 27. Ember TextField valueBinding with dynamic properties
- 28. jQuery .post with dynamic variables 배열
- 29. ngOptions with dynamic option 인덱스 배열
- 30. link_to with dynamic : 레일의 클래스 스타일?
버튼에 밑줄이 그어진 문자열 (링크)이 포함 된 텍스트가 있어야 함을 의미합니다. – boburShox