Java Code Examples for com.norbsoft.typefacehelper.TypefaceHelper#typeface()
The following examples show how to use
com.norbsoft.typefacehelper.TypefaceHelper#typeface() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OverlayTopMenuView.java From Qiitanium with MIT License | 6 votes |
@Override protected void onViewCreated(View view) { layout = view.findViewById(R.id.overlay_top_menu); layoutToggle = view.findViewById(R.id.overlay_top_menu_toggle_btn); layoutToggle.setSelected(ViewUtils.isVisible(layout)); homeBtn = view.findViewById(R.id.overlay_top_menu_logged_in_home_btn); homeLabel = view.findViewById(R.id.overlay_top_menu_logged_in_name_text); refreshBtn = view.findViewById(R.id.overlay_top_menu_refresh_btn); refreshLabel = view.findViewById(R.id.overlay_top_menu_refresh_text); settingBtn = view.findViewById(R.id.overlay_top_menu_settings_btn); settingLabel = view.findViewById(R.id.overlay_top_menu_settings_text); TypefaceHelper.typeface(homeLabel); TypefaceHelper.typeface(refreshLabel); TypefaceHelper.typeface(settingLabel); layoutToggle.setOnClickListener(this); homeBtn.setOnClickListener(this); refreshBtn.setOnClickListener(this); settingBtn.setOnClickListener(this); }
Example 2
Source File: OverlayArticleMenuView.java From Qiitanium with MIT License | 6 votes |
@Override protected void onViewCreated(View view) { layout = view.findViewById(R.id.overlay_article_menu); layoutToggle = view.findViewById(R.id.overlay_article_menu_toggle_btn); layoutToggle.setSelected(ViewUtils.isVisible(layout)); homeBtn = view.findViewById(R.id.overlay_article_menu_logged_in_home_btn); homeLabel = view.findViewById(R.id.overlay_article_menu_logged_in_name_text); stockBtn = view.findViewById(R.id.overlay_article_menu_stock_btn); shareBtn = view.findViewById(R.id.overlay_article_menu_share_btn); openBrowserBtn = view.findViewById(R.id.overlay_article_menu_open_browser_btn); commentBtn = view.findViewById(R.id.overlay_article_menu_comment_btn); TypefaceHelper.typeface(homeLabel); layoutToggle.setOnClickListener(this); homeBtn.setOnClickListener(this); stockBtn.setOnClickListener(this); shareBtn.setOnClickListener(this); openBrowserBtn.setOnClickListener(this); commentBtn.setOnClickListener(this); }
Example 3
Source File: ArticleListItemView.java From Qiitanium with MIT License | 6 votes |
@Override protected void onViewCreated(final View view) { titleText = RxView.findById(view, R.id.list_item_article_title); bodyText = RxView.findById(view, R.id.list_item_article_body); createdAtText = RxView.findById(view, R.id.list_item_article_timeago); authorNameText = RxView.findById(view, R.id.list_item_article_author_text); authorThumbnailImage = RxView.findById(view, R.id.list_item_article_author_image); bookmarkIcon = RxView.findById(view, R.id.list_item_article_bookmark_icon); tagText = RxView.findById(view, R.id.list_item_article_tag); // Apply custom font TypefaceHelper.typeface(createdAtText.get()); TypefaceHelper.typeface(tagText.get()); setOnClickListener(this); }
Example 4
Source File: BaseActivity.java From FragmentNavigationPatternDemo with Apache License 2.0 | 5 votes |
@Override public void setContentView(int layoutResID) { // We set a toolbar layout as the default and inflate into the content layout super.setContentView(R.layout.toolbar_layout); mToolbar = (Toolbar) findViewById(R.id.toolbar); mContentLayout = (FrameLayout) findViewById(R.id.content); // use the new toolbar setSupportActionBar(mToolbar); // Get an inflater getLayoutInflater().inflate(layoutResID, mContentLayout); ButterKnife.bind(this); TypefaceHelper.typeface(this); }
Example 5
Source File: ArticleAboutFragment.java From Qiitanium with MIT License | 5 votes |
@Override public void onDataSetChanged(RxReadOnlyList.Event event) { LayoutInflater inflater = LayoutInflater.from(getContext()); for (int i = 0, size = tagList.size(); i < size; i++) { TagListItemView itemView = Objects.cast( inflater.inflate(R.layout.list_item_tag, listView, false)); itemView.bindTo(tagList.get(i)); listView.addHeaderView(itemView); } View commentHeader = inflater.inflate(R.layout.list_item_comment_header, listView, false); TypefaceHelper.typeface(commentHeader); listView.addHeaderView(commentHeader, null, false); }
Example 6
Source File: TagListItemView.java From Qiitanium with MIT License | 5 votes |
@Override protected void onViewCreated(final View view) { nameText = RxView.findById(view, R.id.list_item_tag_name); // Apply custom font TypefaceHelper.typeface(nameText.get()); setOnClickListener(this); }
Example 7
Source File: CommentListItemView.java From Qiitanium with MIT License | 5 votes |
@Override protected void onViewCreated(final View view) { commentText = RxView.findById(view, R.id.list_item_comment_text); authorThumbImage = RxView.findById(view, R.id.list_item_comment_author_image); commentedAtText = RxView.findById(view, R.id.list_item_comment_timeago); TypefaceHelper.typeface(commentedAtText.get()); }
Example 8
Source File: TagActivity.java From Qiitanium with MIT License | 5 votes |
@Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); overridePendingTransition(R.anim.activity_open_translate, R.anim.activity_close_scale); setContentView(R.layout.activity_tag); View header = findViewById(R.id.header); View headerImage = findViewById(R.id.header_image); headerHelper = new ParallaxHeaderHelper.Builder(header, headerImage) .setMinHeight(getDimensionPixelSize(R.dimen.header_min_height)) .setElevation(getDimensionPixelSize(R.dimen.header_elevation)) .create(); TextView title = ViewUtils.findById(this, R.id.title); title.setText(getTagName()); TextView back = ViewUtils.findById(this, R.id.back); back.setOnClickListener(onBackListener); TypefaceHelper.typeface(title); TypefaceHelper.typeface(back); if (savedInstanceState == null) { setFragment(R.id.content, ArticleListFragment.newInstance(getTagId())); } }
Example 9
Source File: SettingsActivity.java From Qiitanium with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); overridePendingTransition(R.anim.activity_open_translate, R.anim.activity_close_scale); setContentView(R.layout.activity_settings); View header = findViewById(R.id.header); View headerImage = findViewById(R.id.header_image); headerHelper = new ParallaxHeaderHelper.Builder(header, headerImage) .setMinHeight(getDimensionPixelSize(R.dimen.header_min_height)) .setElevation(getDimensionPixelSize(R.dimen.header_elevation)) .create(); TextView title = ViewUtils.findById(this, R.id.title); title.setText(R.string.app_name); TextView back = ViewUtils.findById(this, R.id.back); back.setText(R.string.back_to_prev); back.setOnClickListener(onBackListener); TypefaceHelper.typeface(title); TypefaceHelper.typeface(back); if (savedInstanceState == null) { setFragment(R.id.content, SettingsFragment.newInstance()); } }
Example 10
Source File: ComingSoonFragment.java From Qiitanium with MIT License | 4 votes |
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); TypefaceHelper.typeface(ViewUtils.findById(view, R.id.coming_soon_title)); }
Example 11
Source File: TopActivity.java From Qiitanium with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_top); FragmentManager fm = getFragmentManager(); View header = findViewById(R.id.header); View headerImage = findViewById(R.id.header_image); headerHelper = new ParallaxHeaderHelper.Builder(header, headerImage) .setMinHeight(getDimensionPixelSize(R.dimen.header_min_height)) .setElevation(getDimensionPixelSize(R.dimen.header_elevation)) .create(); SlidingUpPanelLayout slidingUpPanel = ViewUtils.findById(this, R.id.panel); panelHelper = new SlidingUpPanelHelper(slidingUpPanel); TextView title = ViewUtils.findById(this, R.id.title); title.setText(R.string.label_articles); viewPagerAdapter = new FragmentPagerItemAdapter(fm, FragmentPagerItems.with(this) .add(R.string.tab_new, ArticleListFragment.class) .add(R.string.tab_following, ComingSoonScrollableFragment.class) .create()); viewPager = ViewUtils.findById(this, R.id.article_top_viewpager); viewPager.setAdapter(viewPagerAdapter); SmartTabLayout viewPagerTab = ViewUtils.findById(this, R.id.viewpagertab); viewPagerTab.setCustomTabView(R.layout.view_tab, R.id.view_tab_text); viewPagerTab.setViewPager(viewPager); viewPagerTab.setOnPageChangeListener(onPageChangeListener); TextView tagTitle = ViewUtils.findById(this, R.id.tag_top_title); ViewPager tagViewPager = ViewUtils.findById(this, R.id.tag_top_viewpager); tagViewPager.setAdapter(new FragmentPagerItemAdapter(fm, FragmentPagerItems.with(this) .add(R.string.tab_popular, TagListFragment.class) .add(R.string.tab_following, ComingSoonFragment.class) .create())); SmartTabLayout tagViewPagerTab = ViewUtils.findById(this, R.id.tag_top_viewpagertab); tagViewPagerTab.setViewPager(tagViewPager); topMenu = ViewUtils.findById(this, R.id.overlay_top); topMenu.bindTo(this); TypefaceHelper.typeface(title); TypefaceHelper.typeface(tagTitle); TypefaceHelper.typeface(viewPagerTab); TypefaceHelper.typeface(tagViewPagerTab); }
Example 12
Source File: ArticleActivity.java From Qiitanium with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); overridePendingTransition(R.anim.activity_open_translate, R.anim.activity_close_scale); setContentView(R.layout.activity_article); viewModel = ArticleDetailViewModel.create(this); viewModel.loadArticle(getArticleId()); articleMenu = ViewUtils.findById(this, R.id.overlay_article); articleMenu.bindTo(viewModel); View header = findViewById(R.id.header); View headerImage = findViewById(R.id.header_image); headerHelper = new ParallaxHeaderHelper.Builder(header, headerImage) .setMinHeight(getDimensionPixelSize(R.dimen.header_min_height)) .setElevation(getDimensionPixelSize(R.dimen.header_elevation)) .create(); SlidingUpPanelLayout slidingUpPanel = ViewUtils.findById(this, R.id.panel); panelHelper = new SlidingUpPanelHelper(slidingUpPanel); subject = ViewUtils.findById(this, R.id.header_article_subject); title = RxView.findById(this, R.id.header_article_title); timeAgo = RxView.findById(this, R.id.header_article_timeago); back = ViewUtils.findById(this, R.id.back); back.setOnClickListener(onBackListener); back.setAlpha(0f); findViewById(R.id.back_icon).setOnClickListener(onBackListener); TypefaceHelper.typeface(timeAgo.get()); TypefaceHelper.typeface(back); TypefaceHelper.typeface(findViewById(R.id.article_about_title)); if (savedInstanceState == null) { setFragment(R.id.content, ArticleFragment.newInstance()); setFragment(R.id.article_about_content, ArticleAboutFragment.newInstance(getArticleId())); } }
Example 13
Source File: BaseFragment.java From FragmentNavigationPatternDemo with Apache License 2.0 | 3 votes |
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); ButterKnife.bind(this, view); TypefaceHelper.typeface(view); initActionBar(true, getString(R.string.app_name)); }