當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。