當前位置: 首頁>>代碼示例>>Java>>正文


Java Views.inflate方法代碼示例

本文整理匯總了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();
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:11,代碼來源:BaseActivity.java

示例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);
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:8,代碼來源:ListAdapter.java

示例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);
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:8,代碼來源:LayoutsPagerAdapter.java

示例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;
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:5,代碼來源:PhotoListAdapter.java

示例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);
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:6,代碼來源:PhotoPagerAdapter.java

示例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);
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:5,代碼來源:DefaultEndlessRecyclerAdapter.java

示例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());
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:6,代碼來源:DefaultEndlessRecyclerAdapter.java

示例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);
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:6,代碼來源:ListAdapter.java

示例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);
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:6,代碼來源:RecyclerAdapter.java

示例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;
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:5,代碼來源:ListAdapter.java

示例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);
}
 
開發者ID:alexvasilkov,項目名稱:GestureViews,代碼行數:6,代碼來源:ExamplesActivity.java


注:本文中的com.alexvasilkov.android.commons.ui.Views.inflate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。