2017-02-05 12 views
0

현재 alertdialog 내에 탐색 모음이 있습니다. 나는 alerdialog를 더 길게 만들려고 노력하고 있지만 seek.setminheight와 seek.setminwidth를 사용했으며 두 가지 모두 크기가 변하지 않았습니다. 크기를 변경하려면 무엇을 사용해야합니까? 프로그래밍 방식으로 수행해야합니다.seekbar 길이를 프로그래밍 방식으로 변경하는 방법

AlertDialog.Builder dialogSB = new AlertDialog.Builder(context); 
           dialogSB.setTitle("Alert box"); 
           dialogSB.setMessage("Text"); 
           LinearLayout linear = new LinearLayout(context); 
           linear.setOrientation(LinearLayout.HORIZONTAL); 
           linear.setMinimumWidth(400); 
           TextView text = new TextView(context); 
           text.setText("Hello"); 
           text.setPadding(30,30,30,30); 
           SeekBar seek = new SeekBar(context); 
           seek.setMax(14); 
           seek.setMinimumWidth(400); 
           seek.setMinimumHeight(400); 
           linear.addView(text); 
           linear.addView(seek); 
           dialogSB.setView(linear); 
           dialogSB.show(); 

답변

0

해결했습니다. 내가 vertical으로 설정되었을 때 을 horizontal으로 설정했습니다.