本文整理汇总了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("");
}