2016-03-17 82 views

回答

1

您可以設置主題/風格的XML,然後它充氣,它會採取風格/主題:

<TextView xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:text="This is a template" 
     style="@style/my_style" /> 

然後它充氣正常

 TextView view = LayoutInflater.from(mContext).inflate(R.layout.progress_item, viewGroup, false); 

希望它可以幫助...

+0

我可以製作主題嗎? – Steve

+0

'主題'是我朋友的一組風格。 – Eefret