本文整理匯總了Java中com.alexvasilkov.android.commons.ui.Views.inflate方法的典型用法代碼示例。如果您正苦於以下問題:Java Views.inflate方法的具體用法?Java Views.inflate怎麽用?Java Views.inflate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.alexvasilkov.android.commons.ui.Views
的用法示例。
在下文中一共展示了Views.inflate方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showInfoDialog
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
private void showInfoDialog() {
final View layout = Views.inflate(this, R.layout.info_dialog);
final TextView text = layout.findViewById(R.id.info_text);
text.setText(getText(infoTextId));
new AlertDialog.Builder(this)
.setView(layout)
.setPositiveButton(android.R.string.ok, null)
.show();
}
示例2: ImagesViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
ImagesViewHolder(ViewGroup parent) {
super(Views.inflate(parent, R.layout.complex_list_item_images));
row = itemView.findViewById(R.id.complex_item_row);
images[0] = itemView.findViewById(R.id.complex_item_image_1);
images[1] = itemView.findViewById(R.id.complex_item_image_2);
count = itemView.findViewById(R.id.complex_item_count);
}
示例3: ViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
ViewHolder(ViewGroup container) {
super(Views.inflate(container, R.layout.layout_pager_item));
layout = itemView.findViewById(R.id.frame_item_layout);
image = layout.findViewById(R.id.frame_item_image);
title = layout.findViewById(R.id.frame_item_title);
button = layout.findViewById(R.id.frame_item_button);
}
示例4: ViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
ViewHolder(ViewGroup parent) {
super(Views.inflate(parent, R.layout.demo_item_photo));
image = (ImageView) itemView;
}
示例5: ViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
ViewHolder(ViewGroup parent) {
super(Views.inflate(parent, R.layout.demo_item_photo_full));
image = itemView.findViewById(R.id.photo_full_image);
progress = itemView.findViewById(R.id.photo_full_progress);
}
示例6: LoadingViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
LoadingViewHolder(ViewGroup parent) {
super(Views.inflate(parent, R.layout.demo_item_extra_loading));
loading = itemView.findViewById(R.id.extra_loading_text);
}
示例7: ErrorViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
ErrorViewHolder(ViewGroup parent, final EndlessRecyclerAdapter<?> adapter) {
super(Views.inflate(parent, R.layout.demo_item_extra_error));
error = itemView.findViewById(R.id.extra_error);
error.setOnClickListener(view -> adapter.reloadNextItemsIfError());
}
示例8: ViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
ViewHolder(ViewGroup parent) {
itemView = Views.inflate(parent, R.layout.list_image_item);
image = itemView.findViewById(R.id.list_image);
title = itemView.findViewById(R.id.list_image_title);
}
示例9: ViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
ViewHolder(ViewGroup parent) {
super(Views.inflate(parent, R.layout.list_image_item));
image = itemView.findViewById(R.id.list_image);
title = itemView.findViewById(R.id.list_image_title);
}
示例10: TextViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
TextViewHolder(ViewGroup parent) {
super(Views.inflate(parent, R.layout.complex_list_item_text));
text = (TextView) itemView;
}
示例11: ViewHolder
import com.alexvasilkov.android.commons.ui.Views; //導入方法依賴的package包/類
ViewHolder(ViewGroup parent) {
super(Views.inflate(parent, R.layout.examples_list_item));
text = (TextView) itemView;
itemView.setOnClickListener(this);
}