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


Java HeartLayout類代碼示例

本文整理匯總了Java中tyrantgit.widget.HeartLayout的典型用法代碼示例。如果您正苦於以下問題:Java HeartLayout類的具體用法?Java HeartLayout怎麽用?Java HeartLayout使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: onCreate

import tyrantgit.widget.HeartLayout; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_success);

    mHeartLayout = (HeartLayout) findViewById(R.id.heart_layout);
    mTimer.scheduleAtFixedRate(new TimerTask() {
        @Override
        public void run() {
            mHeartLayout.post(new Runnable() {
                @Override
                public void run() {
                    mHeartLayout.addHeart(randomColor());
                }
            });
        }
    }, 500, 200);

}
 
開發者ID:xmlxin,項目名稱:AndroidLogin,代碼行數:20,代碼來源:MyHert.java

示例2: onCreate

import tyrantgit.widget.HeartLayout; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mHeartLayout = (HeartLayout) findViewById(R.id.heart_layout);
    mTimer.scheduleAtFixedRate(new TimerTask() {
        @Override
        public void run() {
            mHeartLayout.post(new Runnable() {
                @Override
                public void run() {
                    mHeartLayout.addHeart(randomColor());
                }
            });
        }
    }, 500, 200);

}
 
開發者ID:xmlxin,項目名稱:AndroidLogin,代碼行數:20,代碼來源:MainActivity.java

示例3: initView

import tyrantgit.widget.HeartLayout; //導入依賴的package包/類
private void initView() {
    mRootView = findViewById(R.id.root_layout_heart_layout);
    mWebViwFrameLayout = (FrameLayout) findViewById(R.id.fl_webView_layout);
    mWebView = new WebView(getApplicationContext());
    mWebView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
    mWebView.setVisibility(View.GONE);

    FrameLayout.LayoutParams fp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
    fp.gravity = Gravity.CENTER;
    mWebViwFrameLayout.addView(mWebView);

    mHeartLayout = (HeartLayout) findViewById(R.id.heart_o_red_layout);
    mTypeTextView = (TypeTextView) findViewById(R.id.typeTextView);
    mBlueSnowView = (FlowerView) findViewById(R.id.flowerview);
    mBlueSnowView.setWH(DeviceInfo.mScreenWidthForPortrait, DeviceInfo.mScreenHeightForPortrait, DeviceInfo.mDensity);
    mBlueSnowView.loadFlower();
    mBlueSnowView.addRect();
    myTimer = new Timer();
    mTask = new TimerTask() {
        public void run() {
            Message msg = new Message();
            msg.what = SNOW_BLOCK;
            mHandler.sendMessage(msg);
        }
    };
    myTimer.schedule(mTask, 3000, 10);
    mTypeTextView.setOnTypeViewListener(new OnTypeViewListener() {
        public void onTypeStart() {
        }

        public void onTypeOver() {
            delayShowTheSnow();
        }
    });
    mTypeTextView.setText("");
}
 
開發者ID:androidmalin,項目名稱:ILOVEYOU,代碼行數:37,代碼來源:HeartActivity.java


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