Skip to content

Commit 5b79e14

Browse files
author
Yoav Sternberg
committed
Title bug fix
save the title so we can set its font size.
1 parent 5f4b508 commit 5b79e14

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

QCircle-Design-Template/src/com/lge/qcircle/template/QCircleTitle.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ public QCircleTitle(Context context, View title, int backgroundColor) {
7878
if (context != null) {
7979
mContext = context;
8080
mRootView = createRootView(context, backgroundColor);
81-
if (title != null)
81+
if (title != null) {
82+
if (title instanceof TextView) mTitleView = (TextView) title;
8283
mRootView.addView(title);
84+
}
8385
} else {
8486
Log.e(TAG, "Cannot create a title view. context is null");
8587
}
@@ -209,4 +211,4 @@ private static TextView createTextView(Context context, String title, int textCo
209211
text.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
210212
return text;
211213
}
212-
}
214+
}

0 commit comments

Comments
 (0)