Androidプログラミング質問スレ Part23
■ このスレッドは過去ログ倉庫に格納されています
0558549
2012/07/09(月) 13:07:40.30ここを参考にしてたんですけど
http://www.ne.jp/asahi/hishidama/home/tech/java/reflection.html#getDeclaredMethod(
PagerTitleStrip strip = ...; を
Class<PagerTitleStrip> strip = PagerTitleStrip.class;して
TextView mCurrText = (TextView)mCurrTextField.get(strip); の後のごにょごにょに、
以下を追加して終わりだと思ってたんですけど上手くいかないです。
Typeface typeface = Typeface.createFromAsset(
mContext.getApplicationContext().getAssets(), "フォントフォルダ/フォント名.ttf");
f(typeface != null && mCurrText!= null ) mCurrText.setTypeface(typeface);
下段のこっちの方も試してみようと思ったんですけど、
int childCount = strip.getChildCount(); ← PagerTitleStripで未定義ですと言われるし
上記をアクティビティのonCreate()直下に記述しているんですけど、
FragmentPagerAdapter内のpublic CharSequence getPageTitle(int position) {内で書くものなんでしょうか?
■ このスレッドは過去ログ倉庫に格納されています