本文整理汇总了Java中com.novoda.notils.caster.Views类的典型用法代码示例。如果您正苦于以下问题:Java Views类的具体用法?Java Views怎么用?Java Views使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Views类属于com.novoda.notils.caster包,在下文中一共展示了Views类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View.inflate(getContext(), R.layout.merge_chat_view, this);
messageView = Views.findById(this, R.id.message_edit);
submitButton = Views.findById(this, R.id.submit_button);
recyclerView = Views.findById(this, R.id.messages_recycler_view);
recyclerView.addItemDecoration(new ChatItemDecoration());
toolbar = Views.findById(this, R.id.toolbar);
toolbar.inflateMenu(R.menu.chat_menu);
toolbar.setNavigationIcon(R.drawable.ic_arrow_back);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
layoutManager.setStackFromEnd(true);
recyclerView.setLayoutManager(layoutManager);
recyclerView.setAdapter(chatAdapter);
}
示例2: setupWebView
import com.novoda.notils.caster.Views; //导入依赖的package包/类
private void setupWebView() {
webView = Views.findById(this, R.id.article_webview);
webViewProgress = Views.findById(this, R.id.article_progress);
WebSettings webSettings = webView.getSettings();
webSettings.setBuiltInZoomControls(true);
webSettings.setDisplayZoomControls(false);
webSettings.setSupportZoom(true);
webSettings.setJavaScriptEnabled(true);
webSettings.setLoadWithOverviewMode(true);
webSettings.setUseWideViewPort(true);
webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webView.setWebViewClient(new HackerNewsWebClient());
webView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
webViewProgress.setProgress(progress);
if (webViewProgress.getProgress() >= 100) {
webViewProgress.setVisibility(View.GONE);
}
}
});
webView.loadUrl(getStory().getUrl());
}
示例3: onCreate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
public void onCreate() {
storyHeaderView = Views.findById(activity, R.id.story_header_view);
replyFab = Views.findById(activity, R.id.story_reply_action);
replyView = Views.findById(activity, R.id.reply_view);
snackbarView = Views.findById(activity, R.id.snackbar);
commentsView = Views.findById(activity, R.id.comments_view);
ViewCompat.setTransitionName(storyHeaderView, VIEW_NAME_HEADER_TITLE);
activity.setupSubActivity();
setupHeaderView();
setupSnackbar();
setupCommentsView();
setupReplyListener();
loadComments();
}
示例4: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
inflate(getContext(), R.layout.merge_welcome_view, this);
welcomeMessage = Views.findById(this, R.id.welcome_message_view);
userAvatar = Views.findById(this, R.id.user_avatar);
proceedButton = Views.findById(this, R.id.proceed_button);
View senderFrame = Views.findById(this, R.id.welcome_sender_layout);
senderFrame.setBackground(new BubblyDrawable(getResources()));
}
示例5: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View.inflate(getContext(), R.layout.merge_channel_item_view, this);
title = Views.findById(this, R.id.channel_title);
lockIcon = Views.findById(this, R.id.lock_icon);
}
示例6: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View.inflate(getContext(), R.layout.merge_channels_view, this);
RecyclerView channels = Views.findById(this, R.id.channels);
channels.addItemDecoration(new ChannelItemDecoration());
channels.setAdapter(channelsAdapter);
newChannelFab = Views.findById(this, R.id.new_channel_fab);
toolbar = Views.findById(this, R.id.toolbar);
toolbar.setTitle(R.string.app_name);
toolbar.inflateMenu(R.menu.channels_menu);
}
示例7: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View.inflate(getContext(), R.layout.merge_new_channel_view, this);
newChannelName = Views.findById(this, R.id.new_channel_name);
privateChannelSwitch = Views.findById(this, R.id.private_channel_switch);
setupToolbar();
}
示例8: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View.inflate(getContext(), R.layout.merge_login_view, this);
loginButton = Views.findById(this, R.id.sign_in_button);
View iconFrame = Views.findById(this, R.id.login_icon_frame_layout);
iconFrame.setBackground(new BubblyDrawable(getResources()));
}
示例9: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View.inflate(getContext(), R.layout.merge_users_view, this);
recyclerView = Views.findById(this, R.id.users_recycler_view);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
toolbar = Views.findById(this, R.id.toolbar);
toolbar.setTitle(R.string.members);
toolbar.inflateMenu(R.menu.users_menu);
recyclerView.setLayoutManager(layoutManager);
}
示例10: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View.inflate(getContext(), R.layout.merge_user_item_view, this);
name = Views.findById(this, R.id.user_name);
image = Views.findById(this, R.id.user_image);
}
示例11: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View.inflate(getContext(), layoutResId, this);
this.picture = Views.findById(this, R.id.message_author_image);
this.body = Views.findById(this, R.id.message_body);
this.time = Views.findById(this, R.id.message_time);
this.name = Views.findById(this, R.id.message_author_name);
}
示例12: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
noneFlower = Views.findById(this, R.id.no_flower);
cherryFlower = Views.findById(this, R.id.cherry);
meconopsisFlower = Views.findById(this, R.id.meconopsis);
poppyFlower = Views.findById(this, R.id.poppy);
birdsfootFlower = Views.findById(this, R.id.birdsfoot_flower);
setSelectedFrom(FlowerOptionPreferences.newInstance().getFlower());
}
示例13: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
sizeSeekBar = Views.findById(this, R.id.brush_size_slider);
inkDropImage = Views.findById(this, R.id.brush_size_image);
brushOptionsPreferences = BrushOptionsPreferences.newInstance();
sizeSeekBar.setProgress(brushOptionsPreferences.getBrushSizePercentage());
updateInkDropImageColor(brushOptionsPreferences.getBrushColor().toAndroidColor());
}
示例14: onFinishInflate
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
darkColor = Views.findById(this, R.id.dark_brush);
amberColor = Views.findById(this, R.id.amber_brush);
eraseColor = Views.findById(this, R.id.erase_brush);
primaryColor = Views.findById(this, R.id.primary_brush);
accentColor = Views.findById(this, R.id.accent_brush);
setSelectedFrom(BrushOptionsPreferences.newInstance().getBrushColor());
}
示例15: onCreateView
import com.novoda.notils.caster.Views; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_bookmarks_feed, container, false);
bookmarksList = Views.findById(rootView, R.id.list_bookmarks);
emptyView = Views.findById(rootView, R.id.feed_empty_placeholder);
setupStoriesList();
return rootView;
}