当前位置: 首页>>代码示例>>Java>>正文


Java TextView.setAnimation方法代码示例

本文整理汇总了Java中android.widget.TextView.setAnimation方法的典型用法代码示例。如果您正苦于以下问题:Java TextView.setAnimation方法的具体用法?Java TextView.setAnimation怎么用?Java TextView.setAnimation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.TextView的用法示例。


在下文中一共展示了TextView.setAnimation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import android.widget.TextView; //导入方法依赖的package包/类
/**
 * Function to init fragment view
 *
 * @param rootView Main view of fragment
 */
private void init(View rootView) {

    pray1 = (RelativeLayout) rootView.findViewById(R.id.p1);
    pray2 = (RelativeLayout) rootView.findViewById(R.id.p2);
    pray3 = (RelativeLayout) rootView.findViewById(R.id.p3);
    pray4 = (RelativeLayout) rootView.findViewById(R.id.p4);
    pray5 = (RelativeLayout) rootView.findViewById(R.id.p5);
    pray6 = (RelativeLayout) rootView.findViewById(R.id.p6);

    final HGDate hgDate = new HGDate();
    monthDay = (TextView) rootView.findViewById(R.id.textView3);
    monthDay.setText(NumbersLocal.convertNumberType(getContext(),hgDate.getDay()+"") );
    monthView = (TextView) rootView.findViewById(R.id.textView4);
    monthView.setText(Dates.gregorianMonthName(getContext(), hgDate.getMonth()-1)+"");
    weekDay = (TextView) rootView.findViewById(R.id.textView);
    weekDay.setText(Dates.weekDayName(getContext(), hgDate.weekDay() + 1));

    hgDate.toHigri();

    HmonthDay = (TextView) rootView.findViewById(R.id.textView5);
    HmonthDay.setText(NumbersLocal.convertNumberType(getContext(), String.valueOf(hgDate.getDay()).trim()));
    HmonthView = (TextView) rootView.findViewById(R.id.textView6);
    HmonthView.setText(Dates.islamicMonthName(getContext(), Integer.valueOf(hgDate.getMonth()) - 1).trim());

    Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.bottom_top);
    fajr = (TextView) rootView.findViewById(R.id.fajrTime);
    fajr.setAnimation(animation);
    sunrise = (TextView) rootView.findViewById(R.id.sunriseTime);
    sunrise.setAnimation(animation);
    zuhr = (TextView) rootView.findViewById(R.id.zuhrTime);
    zuhr.setAnimation(animation);
    asr = (TextView) rootView.findViewById(R.id.asrTime);
    asr.setAnimation(animation);
    magrib = (TextView) rootView.findViewById(R.id.magribTime);
    magrib.setAnimation(animation);
    isha = (TextView) rootView.findViewById(R.id.ishaTime);
    isha.setAnimation(animation);
    salahNow = (TextView) rootView.findViewById(R.id.textView7);
    remain = (TextView) rootView.findViewById(R.id.textView8);

    locationInfo = ConfigPreferences.getLocationConfig(getContext());
    if (locationInfo != null) {
        lr = new LocationReader(context);
        lr.read(locationInfo.latitude,locationInfo.longitude);
        country = (TextView) rootView.findViewById(R.id.textView2);
        country.setText((getResources().getConfiguration()
                .locale.getDisplayLanguage()
                .equals("العربية") ? locationInfo.name_english : locationInfo.name));

        city = (TextView) rootView.findViewById(R.id.textView32);
        city.setText(getString(R.string.near) + " " + (getResources().getConfiguration()
                .locale.getDisplayLanguage()
                .equals("العربية") ? locationInfo.city_ar : locationInfo.city));


        if (lr.isAvailable()){

            getPrayer();
        }


    }


}
 
开发者ID:fekracomputers,项目名称:MuslimMateAndroid,代码行数:71,代码来源:PrayingFragment.java


注:本文中的android.widget.TextView.setAnimation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。