textview에 텍스트가 표시되지 않습니다.

Dharmendra Vaishnav

질문에 적합한 질문 텍스트와 입력 필드를 포함하는 양식을 만들었습니다. 내 양식에 spinner, edittext 및 확인란이 있습니다. 모두 활동을 사용하여 동적으로 생성됩니다. 생성 된 레이아웃의 문제는 입력 필드가 올바르게 표시되지만 텍스트보기가 표시되지 않는다는 것입니다.

   private void  showIssueForm(){
    for (int i=0;i<claimQuestionList.size();i++){
        ClaimQuestion claimQuestion=claimQuestionList.get(i);
        LinearLayout linearLayout=ClaimUtils.createLayoutForClaimQuestion(claimQuestion,this);
        /*claimQuestionsLinearLayout.addView(linearLayout);*/
        claimQuestionsLinearLayout.addView(linearLayout,i);
    }

}   


 private static TextView createTextView(ClaimQuestion claimQuestion,Context context){                                               
 TextView textView=new TextView(context);                                                                                       
 LinearLayout.LayoutParams textViewLayoutParams=new LinearLayout.LayoutParams(300,80,1);                                        
 textView.setText("hi m printing the text what are you looking for");//claimQuestion.getOrder()+". "+claimQuestion.getLabel()); 
 textView.setLayoutParams(textViewLayoutParams);                                                                                
 //textView.setMinLines(1);                                                                                                     
// textView.setSingleLine(false);                                                                                               
 textView.setTextSize(R.dimen.system12);                                                                                        
 textView.setVisibility(View.VISIBLE);                                                                                          
 textView.setTextColor(context.getResources().getColor(R.color.light_white_));                                                  
 return textView;                                                                                                               

}

양식 요소를 추가 한 선형 레이아웃은 다음과 같습니다.

  public static LinearLayout createLayoutForClaimQuestion(ClaimQuestion claimQuestion,Context context){   
 LinearLayout linearLayout=new LinearLayout(context);                                                
 LinearLayout.LayoutParams linearLayoutParams=new LinearLayout.LayoutParams(500,200);                
 linearLayout.setLayoutParams(linearLayoutParams);                                                   
 linearLayout.setOrientation(LinearLayout.VERTICAL);                                                 
 TextView questionLabel=createTextView(claimQuestion,context);                                       
 linearLayout.addView(questionLabel,0);                                                              
 if (claimQuestion.getQuestionType()==ClaimQuestion.QuestionTypeEnum.CQ_TEXT){                       
     EditText editText=createEditText(claimQuestion,context);                                        
     linearLayout.addView(editText,1);                                                               
 }else if(claimQuestion.getQuestionType()==ClaimQuestion.QuestionTypeEnum.CQ_CHECKBOX){              
     CheckBox checkBox=createCheckBox(claimQuestion,context);                                        
     linearLayout.addView(checkBox,1);                                                               
 }else if(claimQuestion.getQuestionType()==ClaimQuestion.QuestionTypeEnum.CQ_SELECT){                
     Spinner spinner=createSpinner(claimQuestion,context);                                           
     linearLayout.addView(spinner,1);                                                                
 }                                                                                                   
 return linearLayout;                                                                                

}

상위 레이아웃의 xml 레이아웃 파일은 다음과 같습니다.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.maximus.mycar.VehicleSelectActivity"
android:background="@drawable/bluebg_320_568">
<include layout="@layout/header"
    android:id="@+id/top_header_layout_ici"
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:layout_marginTop="10dp"/>
<ScrollView
    android:id="@+id/claim_questions_scroll_view"
    android:layout_below="@id/top_header_layout_ici"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent"
    android:layout_marginBottom="20dp"
    >
    <LinearLayout
        android:id="@+id/claim_questions_linear_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

    </LinearLayout>
</ScrollView>

Dharmendra Vaishnav

고정 값을 설정하여 글꼴 크기를 변경하면 정상적으로 작동합니다.

textView.setTextSize(12);

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

TextView가 Google지도 상단에 표시되지 않습니다.

분류에서Dev

Android의 WebView에 메시지 컨텍스트가 표시되지 않습니다.

분류에서Dev

TextView가 필수 텍스트를 표시하지 않습니다.

분류에서Dev

러시아어 텍스트가 EXE 내부에 표시되지 않습니다.

분류에서Dev

android-TextView가 RecyclerView에 표시되지 않습니다.

분류에서Dev

TextView가 레이아웃에 표시되지 않습니다.

분류에서Dev

Android TextView.setText () + getDrawingCache (), 텍스트가 비트 맵에 표시되지 않음

분류에서Dev

SVG 요소에 텍스트가 표시되지 않습니까?

분류에서Dev

Flutter에서 UI의 topCenter에 텍스트가 표시되지 않습니다.

분류에서Dev

새 시리즈가 표시되면 Canvas.textout에 텍스트가 표시되지 않습니다.

분류에서Dev

새 시리즈가 표시되면 Canvas.textout에 텍스트가 표시되지 않습니다.

분류에서Dev

Blender 오브젝트의 UDK에 텍스처가 표시되지 않습니다.

분류에서Dev

컬러 텍스트가 터미널에 표시되지 않습니다.

분류에서Dev

Actionscript 3.0 Timer가 텍스트 상자에 표시되지 않습니다.

분류에서Dev

텍스트가 HTML에서 제대로 표시되지 않습니다.

분류에서Dev

three.js에서 3D 텍스트가 표시되지 않습니다.

분류에서Dev

텍스트 상자에 텍스트가 표시되지 않음

분류에서Dev

Firefox에 텍스트 입력이 표시되지 않습니다.

분류에서Dev

OpenGL 및 Xcode에 텍스처가 표시되지 않습니다.

분류에서Dev

android-location은 토스트에는 표시되지만 textview에는 표시되지 않습니다.

분류에서Dev

텍스트가 ListView의 텍스트보기에 표시되지 않았습니다.

분류에서Dev

TextView 텍스트가 업데이트되지 않았습니다.

분류에서Dev

이미지가 텍스트 옆에 표시되지만 텍스트가 한 줄보다 길 때는 표시되지 않습니다.

분류에서Dev

Android TextView 텍스트가 Listview에서 래핑되지 않습니다.

분류에서Dev

내 텍스트가 모두 표시되지 않는 Android TextView

분류에서Dev

chechbox가 gridview에 텍스트를 표시하지 않습니다.

분류에서Dev

CardView에 TextView가 표시되지 않음

분류에서Dev

SwiftUI 텍스트보기에 표시 할 수없는 문자가 표시되지 않습니다.

분류에서Dev

AngularJS에 메시지 텍스트가 표시되지 않음

Related 관련 기사

  1. 1

    TextView가 Google지도 상단에 표시되지 않습니다.

  2. 2

    Android의 WebView에 메시지 컨텍스트가 표시되지 않습니다.

  3. 3

    TextView가 필수 텍스트를 표시하지 않습니다.

  4. 4

    러시아어 텍스트가 EXE 내부에 표시되지 않습니다.

  5. 5

    android-TextView가 RecyclerView에 표시되지 않습니다.

  6. 6

    TextView가 레이아웃에 표시되지 않습니다.

  7. 7

    Android TextView.setText () + getDrawingCache (), 텍스트가 비트 맵에 표시되지 않음

  8. 8

    SVG 요소에 텍스트가 표시되지 않습니까?

  9. 9

    Flutter에서 UI의 topCenter에 텍스트가 표시되지 않습니다.

  10. 10

    새 시리즈가 표시되면 Canvas.textout에 텍스트가 표시되지 않습니다.

  11. 11

    새 시리즈가 표시되면 Canvas.textout에 텍스트가 표시되지 않습니다.

  12. 12

    Blender 오브젝트의 UDK에 텍스처가 표시되지 않습니다.

  13. 13

    컬러 텍스트가 터미널에 표시되지 않습니다.

  14. 14

    Actionscript 3.0 Timer가 텍스트 상자에 표시되지 않습니다.

  15. 15

    텍스트가 HTML에서 제대로 표시되지 않습니다.

  16. 16

    three.js에서 3D 텍스트가 표시되지 않습니다.

  17. 17

    텍스트 상자에 텍스트가 표시되지 않음

  18. 18

    Firefox에 텍스트 입력이 표시되지 않습니다.

  19. 19

    OpenGL 및 Xcode에 텍스처가 표시되지 않습니다.

  20. 20

    android-location은 토스트에는 표시되지만 textview에는 표시되지 않습니다.

  21. 21

    텍스트가 ListView의 텍스트보기에 표시되지 않았습니다.

  22. 22

    TextView 텍스트가 업데이트되지 않았습니다.

  23. 23

    이미지가 텍스트 옆에 표시되지만 텍스트가 한 줄보다 길 때는 표시되지 않습니다.

  24. 24

    Android TextView 텍스트가 Listview에서 래핑되지 않습니다.

  25. 25

    내 텍스트가 모두 표시되지 않는 Android TextView

  26. 26

    chechbox가 gridview에 텍스트를 표시하지 않습니다.

  27. 27

    CardView에 TextView가 표시되지 않음

  28. 28

    SwiftUI 텍스트보기에 표시 할 수없는 문자가 표시되지 않습니다.

  29. 29

    AngularJS에 메시지 텍스트가 표시되지 않음

뜨겁다태그

보관