本文整理匯總了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);
}
示例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);
}
示例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("");
}