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

织梦网站根目录标签郑州网站推广方案

织梦网站根目录标签,郑州网站推广方案,wordpress noinput,WordPress评论后不会跳转TranslateAnimation类是Android系统中的位置变化动画类,用于控制View对象的位置变化,该类继承于Animation类。TranslateAnimation类中的很多方法都与Animation类一致,该类中最常用的方法便是TranslateAnimation构造方法。 【基本语法】public…

     TranslateAnimation类是Android系统中的位置变化动画类,用于控制View对象的位置变化,该类继承于Animation类。TranslateAnimation类中的很多方法都与Animation类一致,该类中最常用的方法便是TranslateAnimation构造方法。


【基本语法】public TranslateAnimation (float fromXDelta, float toXDelta, float fromYDelta, float toYDelta)

参数说明

fromXDelta:位置变化的起始点X坐标。

toXDelta:位置变化的结束点X坐标。

fromYDelta:位置变化的起始点Y坐标。

toYDelta:位置变化的结束点Y坐标。

注意:特别是动画连续切换的时候,初始坐标很关键,后续动画都以初始坐标为参考系切记,坐标原点很关键

多个类似tab 切换的位置效果,本来可以封装成radio 选择的性质,使用起来会更方便

private void InitWidth() {


ivBottomLine = (ImageView) findViewById(R.id.iv_bottom_line);
bottomLineWidth = ivBottomLine.getLayoutParams().width;
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
int screenW = dm.widthPixels;
position_one = (int) (screenW / 3.0);
position_two = position_one * 2;
position_three = position_one * 3;
// 获取屏幕宽度,
Display displaey = StaticMethod.getDisplay(this);
int width = (displaey.getWidth() / 3);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
width, LayoutParams.FILL_PARENT);
int kk = width*2;
switch (type) {
case FROM_LAUNCHER_GONGBIAO_SEARCH:
// mPager.setCurrentItem(1);
layoutParams.setMargins(0, 0, 0, 0);
break;
case FROM_LAUNCHER_GONGLIST_SEARCH:
// mPager.setCurrentItem(1);
layoutParams.setMargins(kk, 0, 0, 0);
break;
default:
layoutParams.setMargins(width, 0, 0, 0);
break;
}


// layoutParams.setMargins(width, 0, 0, 0);
ivBottomLine.setLayoutParams(layoutParams);


// String model = Build.MODEL;
// String mmodel = null;
// try {
// mmodel = URLEncoder.encode(model, "utf-8");
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// } catch (Exception e) {
// }
// if (mmodel != null && mmodel.equals("GT-N5100")) {
// LinearLayout.LayoutParams txt_params1 = new
// LinearLayout.LayoutParams(190,36);
// txt_params1.setMargins(106, 0, 0, 0);
// ivBottomLine.setLayoutParams(txt_params1);
// }
}

坐标处理

public class MyOnPageChangeListener implements OnPageChangeListener {


@Override
public void onPageSelected(int arg0) {
Animation animation = null;
Display displaey = A_StaticMethod
.getDisplay(BaiduSearchActivity.this);
int width = displaey.getWidth() / 3;


switch (arg0) {


case 0:
if (currIndex == 1) {
switch (type) {
case FROM_LAUNCHER_GONGBIAO_SEARCH:
animation = new TranslateAnimation(position_one,
0, 0, 0);
break;
case FROM_LAUNCHER_GONGLIST_SEARCH:
Log.i("xx", "k===dsds=====currIndex========"+currIndex);
animation = new TranslateAnimation(-position_one, -position_two, 0, 0);
break;
default:
animation = new TranslateAnimation(position_one,
-width, 0, 0);
break;
}
tvTabHotKey
.setTextColor(resources
.getColor(R.color.m_bd_baidu_search_tab_normal_textc));
} else if (currIndex == 2) {
switch (type) {
case FROM_LAUNCHER_GONGBIAO_SEARCH:
animation = new TranslateAnimation(position_two,
0, 0, 0);
break;
case FROM_LAUNCHER_GONGLIST_SEARCH:
animation = new TranslateAnimation(0,
-position_two, 0, 0);
break;

default:
animation = new TranslateAnimation(position_two, -width, 0,
0);
break;
}
tvTabApp.setTextColor(resources
.getColor(R.color.m_bd_baidu_search_tab_normal_textc));
}
tvTabLocal.setTextColor(resources
.getColor(R.color.m_bd_baidu_search_tab_select_textc));
boolean conStatus = StaticMethod
.getNetworkConnectionStatus(BaiduSearchActivity.this);


String completeText = editText.getText().toString();
completeText = A_StaticMethod.StringFilterByRegEx(completeText);
try {


if (localFragment != null) {
((M_bd_SearchLocalFragment) localFragment)
.initData(completeText);
MobclickAgent
.onEvent(BaiduSearchActivity.this,
"BaiduSearchActivity_widget_localsearch_app_420");// 百度搜索本地搜索应用页点击搜索的次数
}
} catch (Exception e) {
}
downManager.setVisibility(View.GONE);
downloadNotInstallLayout.setVisibility(View.GONE);


titleIcon.setImageDrawable(getResources().getDrawable(
R.drawable.m_bd_baidu_search_page2icon_bg));
editText.setHint(getResources().getString(
R.string.a_appstore_search_hint));
closeIme();
break;
case 1:
if (currIndex == 0) {
switch (type) {
case FROM_LAUNCHER_GONGBIAO_SEARCH:
animation = new TranslateAnimation(0, position_one, 0,
0);
break;

case FROM_LAUNCHER_GONGLIST_SEARCH:
animation = new TranslateAnimation(-position_two,
-position_one, 0, 0);
break;
default:
animation = new TranslateAnimation(0, position_one
- width, 0, 0);
break;
}
tvTabLocal
.setTextColor(resources
.getColor(R.color.m_bd_baidu_search_tab_normal_textc));
} else if (currIndex == 2) {


switch (type) {
case FROM_LAUNCHER_GONGBIAO_SEARCH:
animation = new TranslateAnimation(position_two,
position_one, 0, 0);
break;

case FROM_LAUNCHER_GONGLIST_SEARCH:
animation = new TranslateAnimation(0,
-position_one, 0, 0);
break;

default:
animation = new TranslateAnimation(position_two,
position_one - width, 0, 0);
break;
}
tvTabApp.setTextColor(resources
.getColor(R.color.m_bd_baidu_search_tab_normal_textc));
}
tvTabHotKey.setTextColor(resources
.getColor(R.color.m_bd_baidu_search_tab_select_textc));
conStatus = StaticMethod
.getNetworkConnectionStatus(BaiduSearchActivity.this);


if (conStatus) {
completeText = editText.getText().toString();
completeText = A_StaticMethod
.StringFilterByRegEx(completeText);
if (appsFragment != null) {
((M_bd_BaiduHotTagFragment) appsFragment)
.initHint(completeText);
}
} else {


Toast.makeText(BaiduSearchActivity.this,
getString(R.string.M_bd_net_set),
Toast.LENGTH_SHORT).show();
}
downManager.setVisibility(View.GONE);
downloadNotInstallLayout.setVisibility(View.GONE);
titleIcon.setImageDrawable(getResources().getDrawable(
R.drawable.widget_baidu_activity_logo));
editText.setHint(getResources().getString(
R.string.baidusb_widget_search_hint));
closeIme();
break;
case 2:
if (currIndex == 0) {
Log.i("xx", "k========currIndex========"+currIndex);
switch (type) {
case FROM_LAUNCHER_GONGBIAO_SEARCH:
animation = new TranslateAnimation(0,
position_two, 0, 0);
break;

case FROM_LAUNCHER_GONGLIST_SEARCH:

animation = new TranslateAnimation(0,
0, 0, 0);
break;
default:
animation = new TranslateAnimation(0, position_two - width,
0, 0);
break;
}
tvTabLocal
.setTextColor(resources
.getColor(R.color.m_bd_baidu_search_tab_normal_textc));
} else if (currIndex == 1) {
Log.i("xx", "m========currIndex========"+currIndex);
switch (type) {
case FROM_LAUNCHER_GONGBIAO_SEARCH:
animation = new TranslateAnimation(position_one,
position_two, 0, 0);
break;
case FROM_LAUNCHER_GONGLIST_SEARCH:
animation = new TranslateAnimation(-position_one,
0, 0, 0);
break;
default:
animation = new TranslateAnimation(position_one,
position_two - width, 0, 0);
break;
}
tvTabHotKey
.setTextColor(resources
.getColor(R.color.m_bd_baidu_search_tab_normal_textc));
}







http://www.ds6.com.cn/news/22071.html

相关文章:

  • 陕西省建设工程造价管理协会网站各大网站排名
  • 合肥网站建设策划方案上海百度推广优化
  • 品牌奶茶加盟网站建设百度竞价排名怎么靠前
  • 一个网站通常包含多个网页吗seo推广公司排名
  • 大连网站快速排名提升广州seo服务公司
  • 百度做网站美国seo薪酬
  • 个人网站对应网站网址网站设计公司上海
  • 网站后台 刷新福州seo结算
  • 包装纸箱公司怎么做网站seo官网优化详细方法
  • 做自己的网站要花多少钱欧洲站fba
  • 中文门户网站有哪些竞价交易规则
  • 爱站工具包的模块有哪些百度网页推广费用
  • 如何在阿里云做网站做网站排名优化的公司
  • 工业软件开发前景seo建设招商
  • 广州番禺电缆集团有限公司百合seo培训
  • 大数据网站怎么做化妆培训
  • 如何自己安装wordpress手机seo百度点击软件
  • 在dw里网站页面列表怎么做网站点击量 哪里查询
  • 营销网站建设 公司排名深圳推广
  • 与网站云相关的词语网络推广哪个平台最好
  • 房产cms网站建设百度收录
  • 网络游戏中心排名优化怎么做
  • 资源分享网站怎么做全网营销推广 好做吗
  • 济南哪个网络公司建网站好seo快速上排名
  • 毕业设计代做网站java每日新闻
  • 做一个b2c网站多少钱引流推广广告怎么写
  • 石家庄商城网站搭建多少钱网络营销的六大特征
  • wordpress时间轴重庆seo公司怎么样
  • 自己做传奇网站成都百度推广电话
  • 女孩子做网站推广如何免费注册一个网站