Code example for ProgressBar

Methods: setPadding

0
        //���Բ���   
        LinearLayout layout = new LinearLayout(this);  
       //���ò��� ˮƽ����   
        layout.setOrientation(LinearLayout.HORIZONTAL);  
         //������   
        progressBar = new ProgressBar(this);  
         //��������ʾλ��   
        progressBar.setPadding(0, 0, 15, 0);  
           
        layout.addView(progressBar, WClayoutParams);  
           
        TextView textView = new TextView(this);  
        textView.setText("������...");  
        textView.setGravity(Gravity.CENTER_VERTICAL);  
           
        layout.addView(textView, FFlayoutParams);  
        layout.setGravity(Gravity.CENTER);  
           
        LinearLayout loadingLayout = new LinearLayout(this);  
        loadingLayout.addView(layout, WClayoutParams);  
Contextual code suggestions in your IDE  Get Codota for Java