當前位置: 首頁>>代碼示例>>Java>>正文


Java LinearLayout.startAnimation方法代碼示例

本文整理匯總了Java中android.widget.LinearLayout.startAnimation方法的典型用法代碼示例。如果您正苦於以下問題:Java LinearLayout.startAnimation方法的具體用法?Java LinearLayout.startAnimation怎麽用?Java LinearLayout.startAnimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.LinearLayout的用法示例。


在下文中一共展示了LinearLayout.startAnimation方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initDisPlay

import android.widget.LinearLayout; //導入方法依賴的package包/類
private void initDisPlay() {
    tvSkip = findViewById(R.id.tv_skip);
    tvSkip.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            skip();
        }
    });
    View contentView = findViewById(R.id.content_view);
    if (DisplayUtil.hasVirtualNavigationBar(this)) {
        contentView.setPadding(0, 0, 0, DisplayUtil.getNavigationBarHeight(this));
    }
    TextView tvVersionName = findViewById(R.id.tv_version_name);
    tvVersionName.setText(BuildConfig.VERSION_NAME);
    LinearLayout llWelcome = (LinearLayout) findViewById(R.id.ll_welcome);
    TextView tvDate = findViewById(R.id.tv_date);
    SimpleDateFormat format2 = new SimpleDateFormat("yyyy年MM月dd日,EEEE");
    tvDate.setText(format2.format(new Date()));
    Animation animation = AnimationUtils.loadAnimation(this, R.anim.alpha_in);
    llWelcome.startAnimation(animation);
}
 
開發者ID:z-chu,項目名稱:FriendBook,代碼行數:22,代碼來源:StartActivity.java

示例2: onLoadSuccess

import android.widget.LinearLayout; //導入方法依賴的package包/類
public void onLoadSuccess(Fragment fragment,ShowRefreshViewListener showRefreshViewListener){
    if (hashMap_fragment_loadView.containsKey(fragment)){
        if (!hashMap_fragment_isSuccess.get(fragment)){
            hashMap_fragment_isSuccess.remove(fragment);
            hashMap_fragment_isSuccess.put(fragment,true);
            View loadView=hashMap_fragment_loadView.get(fragment);
            LinearLayout loadretry_parent=(LinearLayout)loadView.findViewById(R.id.loadretry_parent);
            AlphaAnimation alphaAnimation = new AlphaAnimation(1,0);
            alphaAnimation.setDuration(loadRetryRefreshConfig.getEndAnimTime());
            loadretry_parent.startAnimation(alphaAnimation);
            loadretry_parent.setVisibility(View.GONE);
        }else{
            showRefreshViewListener.colseRefreshView();
        }
    }
}
 
開發者ID:NoEndToLF,項目名稱:Gif-Load-ReTry-Refresh,代碼行數:17,代碼來源:LoadReTryRefreshManager.java

示例3: StartAnimations

import android.widget.LinearLayout; //導入方法依賴的package包/類
private void StartAnimations() {
        Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
        anim.reset();
        LinearLayout l = (LinearLayout) findViewById(R.id.lin_lay);
        l.clearAnimation();
        l.startAnimation(anim);

        anim = AnimationUtils.loadAnimation(this, R.anim.translate);
        anim.reset();
        ImageView iv = (ImageView) findViewById(R.id.bard_splash);
        iv.clearAnimation();
        iv.startAnimation(anim);

    splashTread = new Thread() {
        @Override
        public void run() {
            try {
                int waited = 0;
                // Splash screen pause time
                while (waited < 3500) {
                    sleep(100);
                    waited += 100;
                }
                Intent intent = new Intent(SplashActivity.this,
                        MainActivity.class);
                intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
                startActivity(intent);
                SplashActivity.this.finish();
            } catch (InterruptedException e) {
                // do nothing
            } finally {
                SplashActivity.this.finish();
            }

        }
    };
    splashTread.start();

}
 
開發者ID:ma8642,項目名稱:FindSpot,代碼行數:40,代碼來源:SplashActivity.java

示例4: initializeComponent

import android.widget.LinearLayout; //導入方法依賴的package包/類
private void initializeComponent(View view) {

        RelativeLayout rlParent = view.findViewById(library.imagepicker.R.id.dialog_image_picker_rl_parent);
        TextView tvGallery = view.findViewById(library.imagepicker.R.id.dialog_image_picker_tv_gallery);
        TextView tvCamera = view.findViewById(library.imagepicker.R.id.dialog_image_picker_tv_camera);
        TextView tvCancel = view.findViewById(library.imagepicker.R.id.dialog_image_picker_tv_cancel);
        LinearLayout llAnimateLayout = view.findViewById(library.imagepicker.R.id.dialog_image_picker_ll_dialog);

        Animation animation = AnimationUtils.loadAnimation(getActivity(), library.imagepicker.R.anim.bottom_up);
        llAnimateLayout.startAnimation(animation);
        llAnimateLayout.setVisibility(View.VISIBLE);

        rlParent.setOnClickListener(this);
        tvGallery.setOnClickListener(this);
        tvCamera.setOnClickListener(this);
        tvCancel.setOnClickListener(this);
    }
 
開發者ID:KaranMavadhiya,項目名稱:Android_ImagePicker,代碼行數:18,代碼來源:ImagePickerDialog.java

示例5: StartAnimations

import android.widget.LinearLayout; //導入方法依賴的package包/類
private void StartAnimations() {


        Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
        anim.reset();
        LinearLayout l = (LinearLayout) findViewById(R.id.lin_lay);
        l.clearAnimation();
        l.startAnimation(anim);
        anim = AnimationUtils.loadAnimation(this, R.anim.rotate);
        anim.reset();

        ImageView iv = (ImageView) findViewById(R.id.splash);

        iv.clearAnimation();
        iv.startAnimation(anim);

        splashTread = new Thread() {
            @Override
            public void run() {
                try {
                    int waited = 0;
                    while (waited < 3500) {
                        sleep(100);
                        waited += 100;
                    }
                    Intent intent = new Intent(Splashscreen.this,
                            MainActivity.class);
                    intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);

                    startActivity(intent);
                    Splashscreen.this.finish();

                } catch (InterruptedException e) {

                } finally {
                    Splashscreen.this.finish();
                }
            }
        };
        splashTread.start();
    }
 
開發者ID:lmartire,項目名稱:DoApp,代碼行數:42,代碼來源:Splashscreen.java


注:本文中的android.widget.LinearLayout.startAnimation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。