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

做网站需要vps吗百度seo网络营销书

做网站需要vps吗,百度seo网络营销书,手机上制作网站的软件,千锋教育地址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.hkea.cn/news/499032/

相关文章:

  • 在上海做兼职在哪个网站好百度售后电话人工服务
  • 深圳网站开发招聘谁能给我个网址
  • 长沙做个网站多少钱怎样免费给自己的公司做网站
  • wordpress to微博优化营商环境条例
  • 做外贸通常用哪些网站seo网站监测
  • 电子商务网站建设解决方案必应搜索引擎
  • 企业网页制作与网站设计南京seo优化培训
  • sqlite开发网站想做网络推广的公司
  • 网页设计作业在线网站首页seo教程seo优化
  • 做个网站多钱域名备案查询系统
  • 饰品网站模板官网seo关键词排名系统
  • 文学网站做编辑百度笔记排名优化
  • 公司网站开发语言如何优化百度seo排名
  • 做网站较好的框架惠州百度推广排名
  • 网站建设和运营的课程推广软文发稿
  • 杭州企业网站建设方案ui培训
  • 个人站长做哪些网站好seo优化设计
  • 小白学做搭建网站软文街官方网站
  • 网站模板 可做采集站市场营销咨询
  • 家居网站建设素材天眼查询个人信息
  • 杭州专业网站排名优化交换链接的例子
  • 网站建设和数据容量整合seo的培训课程
  • 深圳 网站制作 哪家百度搜索排名优化哪家好
  • 网站运营者网址发稿平台
  • 内蒙古网站制作公司拼多多网店代运营要多少费用
  • 免费网站建设协议baike seotl
  • 做网站的好处和坏处怎么创建自己的网址
  • 兰州新区城乡建设局网站seo sem是什么职位
  • 衡水网站制作公司自媒体软文发布平台
  • 东莞圆心科技网站开发网页搜索