本文整理汇总了Java中me.grantland.widget.AutofitTextView类的典型用法代码示例。如果您正苦于以下问题:Java AutofitTextView类的具体用法?Java AutofitTextView怎么用?Java AutofitTextView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AutofitTextView类属于me.grantland.widget包,在下文中一共展示了AutofitTextView类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initView
import me.grantland.widget.AutofitTextView; //导入依赖的package包/类
private void initView() {
root = (RelativeLayout) findViewById(R.id.root);
colorRecyclerView = (RecyclerView) findViewById(R.id.color_list);
colorRecyclerView.setLayoutManager(new GridLayoutManager(this, 7));
c_ring = (GGArcProgressBar) findViewById(R.id.c_ring);
m_ring = (GGArcProgressBar) findViewById(R.id.m_ring);
y_ring = (GGArcProgressBar) findViewById(R.id.y_ring);
k_ring = (GGArcProgressBar) findViewById(R.id.k_ring);
r_number = (GGScrollNumberView) findViewById(R.id.r_number);
g_number = (GGScrollNumberView) findViewById(R.id.g_number);
b_number = (GGScrollNumberView) findViewById(R.id.b_number);
tv_name_ja = (TextView) findViewById(R.id.color_name_ja);
tv_name_en = (AutofitTextView) findViewById(R.id.color_name_en);
}
开发者ID:gjiazhe,项目名称:NipponColors,代码行数:18,代码来源:ShowActivity.java
示例2: MyViewHolder
import me.grantland.widget.AutofitTextView; //导入依赖的package包/类
public MyViewHolder(View view) {
super(view);
walletaddress = (AutofitTextView) view.findViewById(R.id.walletaddress);
walletname = (TextView) view.findViewById(R.id.walletname);
walletbalance = (TextView) view.findViewById(R.id.walletbalance);
addressimage = (ImageView) view.findViewById(R.id.addressimage);
type = (ImageView) view.findViewById(R.id.type);
container = (LinearLayout) view.findViewById(R.id.container);
}
开发者ID:manuelsc,项目名称:Lunary-Ethereum-Wallet,代码行数:10,代码来源:WalletAdapter.java
示例3: addUrlListener
import me.grantland.widget.AutofitTextView; //导入依赖的package包/类
public void addUrlListener(final View view) {
final SimpleDraweeView companyImage = ((SimpleDraweeView) view.findViewById(R.id.image));
companyImage.setOnTouchListener(new View.OnTouchListener() {
private Rect rect;
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
companyImage.setColorFilter(Color.argb(50, 0, 0, 0));
rect = new Rect(v.getLeft(), v.getTop(), v.getRight(), v.getBottom());
mIsUrlPressedDown = true;
break;
case MotionEvent.ACTION_UP:
if (rect.contains(v.getLeft() + (int) event.getX(), v.getTop() + (int) event.getY())) {
companyImage.setColorFilter(Color.argb(0, 0, 0, 0));
mIsUrlPressedDown = false;
WebView webView = (WebView) view.findViewById(R.id.web);
WebSettings settings = webView.getSettings();
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
AutofitTextView textView = (AutofitTextView) view.findViewById(R.id.description);
if (webView.getVisibility() == GONE) {
textView.setVisibility(GONE);
if (webView.getUrl() == null) {
webView.setWebViewClient(new WebViewClient());
webView.loadUrl("http://www.careercup.com" + getTopCardModel().getId());
}
webView.setVisibility(VISIBLE);
} else {
textView.setVisibility(VISIBLE);
webView.setVisibility(GONE);
}
}
break;
case MotionEvent.ACTION_MOVE:
if (!rect.contains(v.getLeft() + (int) event.getX(), v.getTop() + (int) event.getY())) {
companyImage.setColorFilter(Color.argb(0, 0, 0, 0));
mIsUrlPressedDown = false;
}
}
return true;
}
});
}
开发者ID:KonradJanica,项目名称:aMatch,代码行数:46,代码来源:CardContainer.java
注:本文中的me.grantland.widget.AutofitTextView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论