두 개의 android:id
이 있습니다. 예를 들어XML의 단일 TextView에 두 개의 R.id 추가하기
: I는 하나의 텍스트가 에러 메시지를 표시 뷰에서 함께 넣어 된 .java 파일
TextView tv = (TextView)findViewById(R.id.custom_font);
Typeface cFont = Typeface.createFromAsset(getAssets(), "fonts/jcc.ttf");
tv.setTypeface(cFont);
// Adding items to listview
adapter = new ArrayAdapter<String>(this, R.layout.list_item, R.id.product_name, products);
lv.setAdapter(adapter);
의 [R.id.custom_font
] 및 [R.id.product_name
]
[속성 "로이드 : ID 텍스트 뷰 "]
.XML 파일에서"이미 요소에 대해 지정된 "
<TextView
android:textColor="?android:textColorPrimary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/custom_font"
android:id="@+id/product_name" //Attribute "android:id" was already specified for element "TextView"
android:textSize="15sp" />
두 개의 android : id를 단일 텍스트보기로 전달하려면 어떻게해야합니까?
미리 감사드립니다.
이 왜 이렇게할까요? TextView를 단일 ID로 참조하십시오. –
도와주세요. [Download This] (https://dl.dropbox.com/u/15065300/To-Use-Custom-Font.zip) –