경고 대화 상자에서 세 개의 버튼을 어떻게 팽창시켜야하는지 묻는 것이 필요합니다. 기본적으로 목록보기를 사용할 수 있으며 사용자가 목록 항목을 길게 누르면 알림 대화 상자가 나타나야하고 대화 상자에는 편집, 삭제 및 기타 버튼이 있어야하며 버튼을 누르면 작업이 수행되어야합니다. 정말 감사하겠습니다. 누군가가 내가 buttons.Thanks경고 대화 상자에서 확대보기
0
A
답변
1
두 바퀴를 발명 할 필요없이 경고 대화 상자를 부풀게하는 방법으로 말해 줄 수 있다면 .. 그것의 컨텍스트 메뉴라고 : http://developer.android.com/guide/topics/ui/menus.html
1
을 당신은에 AlertDialog를 사용하는 경우 3 개의 버튼을 추가 할 수 있습니다.
new AlertDialog.Builder(this)
.setPositiveButton("Edit", new OnClickListener()
{
// Code Here
})
.setNeutralButton("Delete", new OnClickListener()
{
// Code Here
})
.setNegativeButton("Delete", new OnClickListener()
{
// Code Here
})
.create()
.show();
0
당신은 너무 마찬가지로, 상황에 맞는 메뉴를 사용할 수 있습니다
final OnCreateContextMenuListener occml = new OnCreateContextMenuListener() {
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)
{
AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
menu.setHeaderTitle(pi.getBrowserIdentifier());
menu.add(R.id.actionBarMenu_Settings, R.string.one, 1, getString(R.string.one));
menu.add(R.id.actionBarMenu_Settings, R.string.two, 2, getString(R.two));
menu.add(R.id.actionBarMenu_Settings, R.string.three, 3, getString(R.string.three));
};
_listView= (ListView) findViewById(R.id.list);
_listView.setOnCreateContextMenuListener(occml);
0
을 난, 이런 식으로 일을하고도 할 수 있습니다
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Seçenekler");
builder.setAdapter(/*#your adapter here#*/, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//do something
}
});
0
다음 코드 캡쳐 뷰 재정의 setView에서 사용자 정의 대화 상자 클래스는 경고 대화 상자를 확장합니다.
class example extends Activity{
private void onClick_show_dialog(View v)
{
LayoutInflater lainf = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final View frmFileSystem = lainf.inflate(R.layout.dlg_filesystem, (ViewGroup) findViewById(R.id.lilaFileSystem));
dlg_filesystem = new DlgFileSystem(this);
dlg_filesystem.setView(frmFileSystem);
dlg_filesystem.setCancelable(true);
dlg_filesystem.setButton('aceptar' , new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which)
{
alert(dlg_filesystem.prueba);
}});
dlg_filesystem.setButton2('cancelar' , new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which)
{
}});
dlg_filesystem.show();
}
}
및
public class DlgFileSystem extends AlertDialog{
public String prueba;
private Context context;
private View frmFileSystem;
public DlgFileSystem(Context context)
{
super(context);
this.context = context;
}
@Override
public void setView(View frmFileSystem)
{
super.setView(frmFileSystem);
this.frmFileSystem = frmFileSystem;
TextView txprueba = (TextView)frmFileSystem.findViewById(R.id.txPrueba);
txprueba.setText("adios");
}
}
관련 문제
- 1. 경고 대화 상자에서 다중 선택
- 2. Android : 형식 경고 대화 상자에서
- 3. 표시 경고 대화 상자에서 broatcastReceiver
- 4. 확대보기
- 5. Android가 경고 대화 상자에서 선택한 항목을 설정합니다.
- 6. 경고 대화 상자에서 사용자 지정 대화 상자 실행 - NullPointer 오류
- 7. 대화 상자에서 대화 호출
- 8. 대화 상자에서
- 9. 경고 대화
- 10. 경고 대화 상자
- 11. 경고 대화 상자에서 문자 메시지의 위치를 설정하는 방법
- 12. 경고 대화 상자에서 Robotium을 클릭하는 버튼을 선택하는 방법은 무엇입니까?
- 13. 지도 정보 창을 경고 대화 상자에서 단순지도로 변경합니다. 정보
- 14. 다중 선택 항목 경고 대화 상자에서 이전 값을로드 하시겠습니까?
- 15. 경고 대화 상자에서 두 텍스트 사이에 공백을 추가하는 방법
- 16. 경고 대화 상자에서 검색 키를 누르고 처리 할 수 있습니까?
- 17. 경고 대화 상자에서 여러 편집 상자 사용 방법
- 18. 검증 경고 대화
- 19. 경고 대화 상자 아이콘이 없습니다
- 20. 텍스트 확대/축소 확대보기
- 21. HTML 캔버스 확대보기
- 22. 확대보기 차트 컨트롤
- 23. LayoutTransition : 확대보기 옆에보기 애니메이션
- 24. 대화 상자에서 listview를 만드시겠습니까?
- 25. 찾아보기 대화 상자에서 WIX
- 26. 대화 상자에서 뒤로 버튼
- 27. Jface 대화 상자에서 ScrollledComposite
- 28. 대화 상자에서 변수 변경
- 29. 대화 상자에서 int를 반환합니다.
- 30. 대화 상자에서 어떻게 작동합니까?