本文整理匯總了Java中android.support.v7.widget.AppCompatTextView類的典型用法代碼示例。如果您正苦於以下問題:Java AppCompatTextView類的具體用法?Java AppCompatTextView怎麽用?Java AppCompatTextView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AppCompatTextView類屬於android.support.v7.widget包,在下文中一共展示了AppCompatTextView類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createDialog
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
private static AlertDialog createDialog(final Context context) {
AppCompatTextView messageTextView = new AppCompatTextView(context);
messageTextView.setTextSize(16f);
messageTextView.setText(context.getString(R.string.download_manager_disabled));
messageTextView.setPadding(50, 50, 50, 0);
messageTextView.setTextColor(ContextCompat.getColor(context, R.color.black));
return new AlertDialog.Builder(context)
.setView(messageTextView)
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
enableDownloadManager(context);
}
})
.setCancelable(false)
.create();
}
示例2: PackageViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public PackageViewHolder(View itemView, OnRecyclerViewItemClickListener listener) {
super(itemView);
textViewPackageName = (AppCompatTextView) itemView.findViewById(R.id.textViewPackageName);
textViewStatus = (AppCompatTextView) itemView.findViewById(R.id.textViewStatus);
textViewTime = (AppCompatTextView) itemView.findViewById(R.id.textViewTime);
textViewAvatar = (AppCompatTextView) itemView.findViewById(R.id.textViewAvatar);
textViewRemove = (AppCompatTextView) itemView.findViewById(R.id.textViewRemove);
imageViewRemove = (ImageView) itemView.findViewById(R.id.imageViewRemove);
circleImageViewAvatar = (CircleImageView) itemView.findViewById(R.id.circleImageView);
layoutMain = (LinearLayout) itemView.findViewById(R.id.layoutPackageItemMain);
wrapperView = itemView.findViewById(R.id.layoutPackageItem);
this.listener = listener;
itemView.setOnClickListener(this);
itemView.setOnCreateContextMenuListener(this);
}
示例3: PackageStatusViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public PackageStatusViewHolder(View itemView) {
super(itemView);
textViewLocation = (AppCompatTextView) itemView.findViewById(R.id.textViewStatus);
textViewTime = (AppCompatTextView) itemView.findViewById(R.id.textViewTime);
timeLine = (Timeline) itemView.findViewById(R.id.timeLine);
contactCard = (CardView) itemView.findViewById(R.id.contactCard);
textViewPhone = (AppCompatTextView) itemView.findViewById(R.id.textViewPhone);
// Just handle the click event in adapter
// No need to set an {@link OnRecyclerViewItemClickListener}
contactCard.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String uri = textViewPhone.getText().toString();
if (uri.length() > 0) {
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:" + uri));
context.startActivity(intent);
}
}
});
}
示例4: HeaderViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public HeaderViewHolder(View itemView) {
super(itemView);
textViewCompany = (AppCompatTextView) itemView.findViewById(R.id.textViewCompany);
textViewNumber = (AppCompatTextView) itemView.findViewById(R.id.textViewPackageNumber);
textViewName = (AppCompatTextView) itemView.findViewById(R.id.textViewName);
textViewCompany.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (aPackage.getCompany() != null) {
Intent intent = new Intent(context, CompanyDetailActivity.class);
intent.putExtra(CompanyDetailActivity.COMPANY_ID, aPackage.getCompany());
context.startActivity(intent, ActivityOptions.makeSceneTransitionAnimation((PackageDetailsActivity)context).toBundle());
}
}
});
}
示例5: showInfo
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
protected void showInfo(String header, String desc, @Nullable Drawable drawable, boolean error) {
hideKeyboard();
AppCompatTextView infoHeader = (AppCompatTextView) llBottomSheet.findViewById(R.id.info_header);
AppCompatTextView infoDesc = (AppCompatTextView) llBottomSheet.findViewById(R.id.info_desc);
AppCompatImageView infoImg = (AppCompatImageView) llBottomSheet.findViewById(R.id.info_img);
if (error) {
llBottomSheet.findViewById(R.id.info_img).setVisibility(View.GONE);
((AppCompatButton) findViewById(R.id.ok_dimiss)).setText("Close");
} else {
llBottomSheet.findViewById(R.id.info_img).setVisibility(View.VISIBLE);
((AppCompatButton) findViewById(R.id.ok_dimiss)).setText("Ok");
}
infoHeader.setText(header);
infoDesc.setText(desc);
if (drawable != null)
infoImg.setImageDrawable(drawable);
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
}
示例6: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_relatedCompanyName = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_relatedCompanyName);
tv_fundName = (AppCompatTextView) itemView.findViewById(R.id.tv_fundName);
tv_amountRmb = (AppCompatTextView) itemView.findViewById(R.id.tv_amountRmb);
tv_createDate = (AppCompatTextView) itemView.findViewById(R.id.tv_createDate);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
rl_content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
T_AccountFundDetailsEntity.RowsEntity rowsEntity = list.get(getLayoutPosition());
T_AccountFundDetailsActivity_.intent(getActivity()).extra("rowsEntity", rowsEntity).start();
}
});
}
示例7: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_salesorder = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_salesorder);
tv_statusFormatCn = (AppCompatTextView) itemView.findViewById(R.id.tv_statusFormatCn);
tv_orderform_amount = (AppCompatTextView) itemView.findViewById(R.id.tv_orderform_amount);
tv_orderform_createDate = (AppCompatTextView) itemView.findViewById(R.id.tv_orderform_createDate);
tv_orderform_foreignName = (AppCompatTextView) itemView.findViewById(R.id.tv_orderform_foreignName);
tv_orderform_code = (AppCompatTextView) itemView.findViewById(R.id.tv_orderform_code);
tv_orderItemName = (AppCompatTextView) itemView.findViewById(R.id.tv_orderItemName);
tv_customerPurchaseOrder = (AppCompatTextView) itemView.findViewById(R.id.tv_customerPurchaseOrder);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
rl_content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
T_OrderFormEntity.RowsEntity rowsEntity = list.get(getLayoutPosition());
T_OrderFormDetailsActivity_.intent(getActivity()).extra(AppDelegate.ORDER_ID, rowsEntity.getId()).start();
}
});
}
示例8: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_storageListGrid_deliveryInvoiceCode = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_storageListGrid_deliveryInvoiceCode);
tv_storageListGrid_blNo = (AppCompatTextView) itemView.findViewById(R.id.tv_storageListGrid_blNo);
tv_storageListGrid_businessEnterpriseName = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_storageListGrid_businessEnterpriseName);
tv_storageListGrid_storageStatus = (AppCompatTextView) itemView.findViewById(R.id.tv_storageListGrid_storageStatus);
tv_storageListGrid_deliveryDate = (AppCompatTextView) itemView.findViewById(R.id.tv_storageListGrid_deliveryDate);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
rl_content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
CB_ManageListEntity.RowsEntity rowsEntity = list.get(getLayoutPosition());
CB_ManageDetailsActivity_.intent(getActivity()).extra(AppDelegate.ID, rowsEntity.getId())
.extra(AppDelegate.TOOLBAR_TITLE, rowsEntity.getDeliveryInvoiceCode()).start();
}
});
}
示例9: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_count = (AppCompatTextView) itemView.findViewById(R.id.tv_count);
tv_shippingDetailList_nameCn = (AppCompatTextView) itemView.findViewById(R.id.tv_shippingDetailList_nameCn);
tv_shippingDetailList_quantity = (AppCompatTextView) itemView.findViewById(R.id.tv_shippingDetailList_quantity);
tv_shippingDetailList_packingUnitEn = (AppCompatTextView) itemView.findViewById(R.id.tv_shippingDetailList_packingUnitEn);
tv_shippingDetailList_grossWeight = (AppCompatTextView) itemView.findViewById(R.id.tv_shippingDetailList_grossWeight);
tv_shippingDetailList_vol = (AppCompatTextView) itemView.findViewById(R.id.tv_shippingDetailList_vol);
tv_shippingDetailList_netWeight = (AppCompatTextView) itemView.findViewById(R.id.tv_shippingDetailList_netWeight);
// 整個條目點擊事件
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}
示例10: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_warning_export_invoice_number = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_warning_export_invoice_number);
tv_warning_foreign_businessman = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_warning_foreign_businessman);
tv_warning_invoice_unit = (AppCompatTextView) itemView.findViewById(R.id.tv_warning_invoice_unit);
tv_warning_amount = (AppCompatTextView) itemView.findViewById(R.id.tv_warning_amount);
tv_warning_invoice_date = (AppCompatTextView) itemView.findViewById(R.id.tv_warning_invoice_date);
tv_warning_declare_date = (AppCompatTextView) itemView.findViewById(R.id.tv_warning_declare_date);
tv_warning_approve_expiration_date = (AppCompatTextView) itemView.findViewById(R.id.tv_warning_approve_expiration_date);
tv_warning_order_serial_number = (AppCompatTextView) itemView.findViewById(R.id.tv_warning_order_serial_number);
tv_warning_po_number = (AppCompatTextView) itemView.findViewById(R.id.tv_warning_po_number);
tv_warning_create_date = (AppCompatTextView) itemView.findViewById(R.id.tv_warning_create_date);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
rl_content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}
示例11: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_count = (AppCompatTextView) itemView.findViewById(R.id.tv_count);
tv_container_typeName = (AppCompatTextView) itemView.findViewById(R.id.tv_container_typeName);
tv_container_count = (AppCompatTextView) itemView.findViewById(R.id.tv_container_count);
tv_container_remark = (AppCompatTextView) itemView.findViewById(R.id.tv_container_remark);
tv_container_sealNo = (AppCompatTextView) itemView.findViewById(R.id.tv_container_sealNo);
tv_container_carNo = (AppCompatTextView) itemView.findViewById(R.id.tv_container_carNo);
tv_container_whiteCardNo = (AppCompatTextView) itemView.findViewById(R.id.tv_container_whiteCardNo);
tv_container_driverName = (AppCompatTextView) itemView.findViewById(R.id.tv_container_driverName);
tv_container_driverPhone = (AppCompatTextView) itemView.findViewById(R.id.tv_container_driverPhone);
// 整個條目點擊事件
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}
示例12: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_invoice_code = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_invoice_code);
tv_type = (AppCompatTextView) itemView.findViewById(R.id.tv_type);
tv_invoice_amount = (AppCompatTextView) itemView.findViewById(R.id.tv_invoice_amount);
tv_createDate = (AppCompatTextView) itemView.findViewById(R.id.tv_createDate);
tv_confirmDate = (AppCompatTextView) itemView.findViewById(R.id.tv_confirmDate);
tv_saleOrder = (AppCompatTextView) itemView.findViewById(R.id.tv_saleOrder);
tv_orderCode = (AppCompatTextView) itemView.findViewById(R.id.tv_orderCode);
tv_invoice_status = (AppCompatTextView) itemView.findViewById(R.id.tv_invoice_status);
tv_accountName = (AppCompatTextView) itemView.findViewById(R.id.tv_accountName);
tv_draweerName = (AppCompatTextView) itemView.findViewById(R.id.tv_draweerName);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
rl_content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
T_InvoiceInformationEntity.RowsEntity rowsEntity = list.get(getLayoutPosition());
T_InvoiceInformationProductsActivity_.intent(getActivity()).extra("rowsEntity", rowsEntity).start();
}
});
}
示例13: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_invoice_notice_orderCode = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_invoice_notice_orderCode);
tv_account_name = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_account_name);
tv_status = (AppCompatTextView) itemView.findViewById(R.id.tv_status);
tv_adviceDate = (AppCompatTextView) itemView.findViewById(R.id.tv_adviceDate);
tv_amount = (AppCompatTextView) itemView.findViewById(R.id.tv_amount);
tv_code = (AppCompatTextView) itemView.findViewById(R.id.tv_code);
tv_invoice_notice_remark = (AppCompatTextView) itemView.findViewById(R.id.tv_invoice_notice_remark);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
rl_content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
T_InvoiceNoticeEntity.RowsEntity rowsEntity = list.get(getLayoutPosition());
// 進入詳情頁
T_InvoiceNoticeDetailsActivity_.intent(getActivity()).extra("rowsEntity", rowsEntity).start();
}
});
}
示例14: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_nameCn = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_top_left);
tv_down_left = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_down_left);
tv_country = (AppCompatTextView) itemView.findViewById(R.id.tv_top_right);
tv_status = (AppCompatTextView) itemView.findViewById(R.id.tv_down_right);
ll_content = (LinearLayout) itemView.findViewById(R.id.ll_content);
ll_content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
T_ContactsCompanyEntity.RowsEntity rowsEntity = list.get(getLayoutPosition());
T_ContactsCompanyDetailsActivity_.intent(T_ContactsCompanyListFragment.this).extra(AppDelegate.ROWS_ENTITY, rowsEntity).start();
}
});
}
示例15: ViewHolder
import android.support.v7.widget.AppCompatTextView; //導入依賴的package包/類
public ViewHolder(final View itemView) {
super(itemView);
tv_apply_code = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_apply_code);
tv_saleOrders = (AlwaysMarqueeTextView) itemView.findViewById(R.id.tv_saleOrders);
tv_actualPaymentAmount = (AppCompatTextView) itemView.findViewById(R.id.tv_actualPaymentAmount);
tv_applyPaymentAmount = (AppCompatTextView) itemView.findViewById(R.id.tv_applyPaymentAmount);
tv_status = (AppCompatTextView) itemView.findViewById(R.id.tv_status);
tv_applyDate = (AppCompatTextView) itemView.findViewById(R.id.tv_applyDate);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
rl_content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
T_ApplyPaymentActivityEntity.RowsEntity rowsEntity = list.get(getLayoutPosition());
ArrayList<String> datas = new ArrayList<>();
datas.add(rowsEntity.getId());
datas.add(rowsEntity.getDraweeBankName());
datas.add(rowsEntity.getDraweeBankAccount());
T_ApplyPaymentDetailsActivity_.intent(T_ApplyPaymentActivity.this).stringArrayListExtra("datas", datas).start();
}
});
}