当前位置: 首页 > news >正文

怎么查网站后台地址企业做网站需要那些条件

怎么查网站后台地址,企业做网站需要那些条件,公司建设网站的意义,重庆建筑公司100强Android开发首页底部tab切换图标有动画效果 主页tab切换很正常#xff0c;但往往加上写动画更好看 一、思路#xff1a; 用属性动画#xff0c;并且事先准备多张图片#xff0c;用于切换后播放动画 二、效果图#xff1a; 单纯图看不出来#xff0c;看下视频效果 An…Android开发首页底部tab切换图标有动画效果 主页tab切换很正常但往往加上写动画更好看 一、思路 用属性动画并且事先准备多张图片用于切换后播放动画 二、效果图 单纯图看不出来看下视频效果 Android开发教程实战案例源码分享-首页底部tab切换图标有动画效果 三、关键代码 public class TabButtonGroup extends LinearLayout implements View.OnClickListener {private TabButton[] mTabButtons;private ViewPager mViewPager;private int mCurPosition;public TabButtonGroup(Context context) {this(context, null);}public TabButtonGroup(Context context, Nullable AttributeSet attrs) {this(context, attrs, 0);}public TabButtonGroup(Context context, Nullable AttributeSet attrs, int defStyleAttr) {super(context, attrs, defStyleAttr);}Overrideprotected void onFinishInflate() {super.onFinishInflate();int childCount getChildCount();if (childCount 0) {mTabButtons new TabButton[childCount];for (int i 0; i childCount; i) {View v getChildAt(i);v.setTag(i);v.setOnClickListener(this);mTabButtons[i] (TabButton) v;}}}public void setCurPosition(int position) {if (position mCurPosition) {return;}if (mClickIntercepter ! null mClickIntercepter.needIntercept(position)) {return;}mTabButtons[mCurPosition].setChecked(false);mTabButtons[position].setChecked(true);mCurPosition position;if (mViewPager ! null) {mViewPager.setCurrentItem(position, false);}}Overridepublic void onClick(View v) {Object tag v.getTag();if (tag ! null) {setCurPosition((int) tag);}}public void setViewPager(ViewPager viewPager) {mViewPager viewPager;}public void cancelAnim() {if (mTabButtons ! null) {for (TabButton tbn : mTabButtons) {if (tbn ! null) {tbn.cancelAnim();}}}}public ClickIntercepter mClickIntercepter;public void setClickIntercepter(ClickIntercepter intercepter) {mClickIntercepter intercepter;}public interface ClickIntercepter {boolean needIntercept(int position);}public void btnPerformClick(int position){if (mTabButtons ! nullmTabButtons[position]!null) {mTabButtons[position].performClick();}} }public class TabButton extends LinearLayout {private Context mContext;private float mScale;private String mTip;private int mIconSize;private int mTextSize;private int mTextColorChecked;private int mTextColorUnChecked;private boolean mChecked;private ImageView mImg;private TextView mText;private Drawable[] mDrawables;private int mDrawaleArrayLength;private ValueAnimator mAnimator;private int mDrawableIndex;public TabButton(Context context) {this(context, null);}public TabButton(Context context, AttributeSet attrs) {this(context, attrs, 0);}public TabButton(Context context, AttributeSet attrs, int defStyleAttr) {super(context, attrs, defStyleAttr);mContext context;mScale context.getResources().getDisplayMetrics().density;TypedArray ta context.obtainStyledAttributes(attrs, R.styleable.TabButton);int iconArrayId ta.getResourceId(R.styleable.TabButton_tbn_icon_array_id, 0);mTip ta.getString(R.styleable.TabButton_tbn_tip);mIconSize (int) ta.getDimension(R.styleable.TabButton_tbn_icon_size, 0);mTextSize (int) ta.getDimension(R.styleable.TabButton_tbn_text_size, 0);mTextColorChecked ta.getColor(R.styleable.TabButton_tbn_text_color_checked, 0);mTextColorUnChecked ta.getColor(R.styleable.TabButton_tbn_text_color_unchecked, 0);mChecked ta.getBoolean(R.styleable.TabButton_tbn_checked, false);ta.recycle();if (iconArrayId ! 0) {TypedArray arr getResources().obtainTypedArray(iconArrayId);int len arr.length();int[] iconResArray new int[len];for (int i 0; i len; i) {iconResArray[i] arr.getResourceId(i, 0);}arr.recycle();mDrawaleArrayLength iconResArray.length;if (mDrawaleArrayLength 0) {mDrawables new Drawable[mDrawaleArrayLength];for (int i 0; i mDrawaleArrayLength; i) {mDrawables[i] ContextCompat.getDrawable(context, iconResArray[i]);}}}mAnimator ValueAnimator.ofFloat(1, mDrawaleArrayLength - 1);mAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {Overridepublic void onAnimationUpdate(ValueAnimator animation) {float v (float) animation.getAnimatedValue();int index (int) v;if (mDrawableIndex ! index) {mDrawableIndex index;if (mImg ! null) {mImg.setImageDrawable(mDrawables[index]);}}}});mAnimator.setDuration(500);mAnimator.setInterpolator(new LinearInterpolator());}Overrideprotected void onFinishInflate() {super.onFinishInflate();setOrientation(VERTICAL);setGravity(Gravity.CENTER_HORIZONTAL);mImg new ImageView(mContext);LayoutParams params1 new LayoutParams(mIconSize, mIconSize);params1.setMargins(0, dp2px(4), 0, 0);mImg.setLayoutParams(params1);if (mDrawables ! null mDrawaleArrayLength 0) {if (mChecked) {mImg.setImageDrawable(mDrawables[mDrawaleArrayLength - 1]);} else {mImg.setImageDrawable(mDrawables[0]);}}mText new TextView(mContext);LayoutParams params2 new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);mText.setLayoutParams(params2);mText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);mText.setText(mTip);mText.setTextColor(mChecked ? mTextColorChecked : mTextColorUnChecked);addView(mImg);addView(mText);}public void setChecked(boolean checked) {mChecked checked;if (mDrawables ! null mDrawaleArrayLength 0) {if (mChecked) {if (mText ! null) {mText.setTextColor(mTextColorChecked);}if (mAnimator ! null) {mAnimator.start();}} else {if (mAnimator ! null) {mAnimator.cancel();}if (mImg ! null) {mImg.setImageDrawable(mDrawables[0]);}if (mText ! null) {mText.setTextColor(mTextColorUnChecked);}}}}private int dp2px(int dpVal) {return (int) (mScale * dpVal 0.5f);}public void cancelAnim() {if (mAnimator ! null) {mAnimator.cancel();mAnimator.removeAllUpdateListeners();}}}四、项目demo源码结构图 有问题或者需要完整源码的私信我
http://www.hkea.cn/news/14435898/

相关文章:

  • 北海网站优化如何知道一个网站做的什么推广
  • 南通网站制作外包佛山专业网站制作设计
  • 想做网站制作运营注册什么公司核实最好的网站管理系统
  • 做网站西域数码阿里云网站不能上传附件
  • 社区网站 租用服务器还是只需要购买空间做一款小程序需要多少钱
  • 完整网站开发视频搜索引擎营销的模式有
  • 广州做网站商城的公司沈阳酒店团购网站制作
  • 成都seo网站qq亚洲影视传媒有限公司
  • 上海网站设计推荐刻石家庄百度推广排名优化
  • 网站建设单词济南网站建设网站
  • 网站开发人员晋升体系网页打不开视频
  • 源码分享站有源码如何搭建app
  • 网站的简介怎么在后台炒做孝昌县专注网站建设代理
  • 免费建网站软件哪个好wordpress tag导入
  • 无锡做网站的企业免费logo设计自动生成u钙网
  • 网站建设方案范文8篇延吉建设局网站
  • 装修公司网站用的织梦提供东莞网站制作公司
  • 重庆网站建设 观音桥制作网站付款方式
  • 宁夏建设网站大数据网站开发工程师
  • 企业网站建设的要求oracle数据库网站开发
  • 域名和网站的关系网站有些什么内容
  • 邢台wap网站建设网站已经申请了域名 接下来怎么
  • 专业建设外贸网站c语言编程软件
  • 课程网站模板湖州网
  • 医药类网站前置审批新手做自媒体从哪开始
  • 企业网站建设基本标准能看男女做那个的网站
  • 做网站那个公司好竞价托管推广代运营
  • 制作网页教程的方法我自己的网站怎么做关键词优化
  • 做中介最好用的网站企业网站开发背景及意义
  • 来个手机能看的网站2021做网站小编怎么样