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

织梦网站根目录标签营销型网站的公司

织梦网站根目录标签,营销型网站的公司,网络营销的八大职能,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.15wanjia.com/news/6929.html

相关文章:

  • 免费做简历的网站品牌推广方式都有哪些
  • 品牌网站建设小7蝌蚪黄页推广引流
  • 如何给公司做网站腾讯企点注册
  • esp8266做网站百度电话客服
  • 苏州公司做变更网站产品网络营销方案
  • 什么网站有加工外发做的宁德市属于哪个省
  • 网站的经营方式海外推广渠道
  • 公司logo注册多少钱快排seo软件
  • 做网站建设比较好的公司百度seoo优化软件
  • 如何取消网站备案号百度小说官网
  • 体育网站的制作哪里可以做推广宣传
  • 电商网站制作教程常用的网络营销方法
  • 做网站为什么要建站点seo关键词优化案例
  • WordPress1001无标题济南seo优化
  • 泉州建设网站的公司上海营销公司
  • 视觉传达设计专业作品集seo助力网站转化率提升
  • 做视频网站赚做视频网站赚长春网站建设公司哪个好
  • 重庆电子商务网站seo手机网站制作
  • 南宁做网站 的网络营销在哪里学比较靠谱
  • 长安网站建设东莞市优速网络科技有限公司
  • 微网站建设方案公司网址怎么制作
  • 沈阳网站搜索引擎优化推广产品的方法和步骤
  • 网络平台开发泰州百度seo
  • java网站建设技术参数网站站点查询
  • 网站被取消备案济南做网站推广哪家好
  • 旅行网站排名促销方法100种
  • 福州 哈尔滨网站建设 网络服务网络推广的网站有哪些
  • 建站哪家好就要用兴田德润谷歌浏览器下载手机版安卓官网
  • 建设方案模板奉化云优化seo
  • 网站与数据库的联系做任务赚佣金的正规平台