本文整理汇总了Java中com.nhaarman.supertooltips.ToolTipView类的典型用法代码示例。如果您正苦于以下问题:Java ToolTipView类的具体用法?Java ToolTipView怎么用?Java ToolTipView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolTipView类属于com.nhaarman.supertooltips包,在下文中一共展示了ToolTipView类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addStartTipView
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
private void addStartTipView() {
String strHelpTipStartRecord = getResources().getString(R.string.strHelpTipStartRecord);
ToolTip toolTip = new ToolTip().withText(strHelpTipStartRecord)
.withColor(getResources().getColor(R.color.green6))
.withTextColor(getResources().getColor(R.color.red))
.withAnimationType(ToolTip.AnimationType.FROM_TOP);
View btnStart = getActivity().findViewById(R.id.btnStart);
if(btnStart != null && lyTooltipframe != null){
mStartTipView = lyTooltipframe.showToolTipForView(toolTip, btnStart);
mStartTipView.setOnToolTipViewClickedListener(new OnToolTipViewClickedListener() {
@Override
public void onToolTipViewClicked(ToolTipView toolTipView) {
mStartTipView = null;
}
});
}
}
示例2: addPauseTipView
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
private void addPauseTipView() {
String strHelpTipPauseRecord = getResources().getString(R.string.strHelpTipPauseRecord);
ToolTip toolTip = new ToolTip().withText(strHelpTipPauseRecord)
.withColor(getResources().getColor(R.color.yellow10))
.withTextColor(getResources().getColor(R.color.purple13))
.withAnimationType(ToolTip.AnimationType.FROM_TOP);
View btnPause = findViewById(R.id.btnStart);
if(btnPause != null && lyTooltipframe != null){
mPauseTipView = lyTooltipframe.showToolTipForView(toolTip, btnPause);
mPauseTipView.setOnToolTipViewClickedListener(new OnToolTipViewClickedListener() {
@Override
public void onToolTipViewClicked(ToolTipView toolTipView) {
mPauseTipView = null;
}
});
//6秒后隐藏
btnPause.postDelayed(new Runnable() {
@Override
public void run() {
removeStartTipView();
}
}, 6000);
//2秒后显示停止提示
btnPause.postDelayed(new Runnable() {
@Override
public void run() {
addStopTipView();
}
}, 2000);
}
}
示例3: addStopTipView
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
private void addStopTipView() {
String strHelpTipStopRecord = getResources().getString(R.string.strHelpTipStopRecord);
ToolTip toolTip = new ToolTip().withText(strHelpTipStopRecord)
.withColor(getResources().getColor(R.color.red10))
.withTextColor(getResources().getColor(R.color.green))
.withAnimationType(ToolTip.AnimationType.FROM_TOP);
View btnStop = findViewById(R.id.btnStop);
if(btnStop != null && lyTooltipframe != null){
mStopTipView = lyTooltipframe.showToolTipForView(toolTip, btnStop);
mStopTipView.setOnToolTipViewClickedListener(new OnToolTipViewClickedListener() {
@Override
public void onToolTipViewClicked(ToolTipView toolTipView) {
mStopTipView = null;
}
});
//6秒后隐藏,并显示拍照提示
btnStop.postDelayed(new Runnable() {
@Override
public void run() {
removeStopTipView();
addGetSceneryTipView();
}
}, 6000);
}
}
示例4: addGetSceneryTipView
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
private void addGetSceneryTipView() {
String strHelpTipGetScenery = getResources().getString(R.string.strHelpTipGetScenery);
ToolTip toolTip = new ToolTip().withText(strHelpTipGetScenery)
.withColor(getResources().getColor(R.color.red10))
.withTextColor(getResources().getColor(R.color.green))
.withAnimationType(ToolTip.AnimationType.FROM_MASTER_VIEW);
View vGetScenery = findViewById(R.id.vGetScenery);
if(vGetScenery != null && lyTooltipframe != null){
mGetSceneryTipView = lyTooltipframe.showToolTipForView(toolTip, vGetScenery);
mGetSceneryTipView.setOnToolTipViewClickedListener(new OnToolTipViewClickedListener() {
@Override
public void onToolTipViewClicked(ToolTipView toolTipView) {
mGetSceneryTipView = null;
}
});
//6秒后隐藏
vGetScenery.postDelayed(new Runnable() {
@Override
public void run() {
removeGetSceneryTipView();
}
}, 6000);
}
}
示例5: onToolTipViewClicked
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
@Override
public void onToolTipViewClicked(ToolTipView toolTipView) {
if (mBlueToolTipView == toolTipView) {
mBlueToolTipView = null;
}
}
示例6: onToolTipViewClicked
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
/**
* Handles ToolTipViews
* @param toolTipView pressed ToolTipView
*/
@Override
public void onToolTipViewClicked(ToolTipView toolTipView) {
this.toolTipView.remove();
this.toolTipView = null;
}
开发者ID:SequencingDOTcom,项目名称:RTP-API-Gradle-Maven-Android-File-Selector-Java,代码行数:10,代码来源:PreFileSelectorActivity.java
示例7: onToolTipViewClicked
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
/**
* Handles ToolTipViews
* @param toolTipView pressed ToolTipView
*/
@Override
public void onToolTipViewClicked(ToolTipView toolTipView) {
this.toolTipView.remove();
this.toolTipView = null;
}
开发者ID:SequencingDOTcom,项目名称:RTP-API-Gradle-Maven-Android-File-Selector-Java,代码行数:10,代码来源:FileSelectorActivity.java
示例8: onToolTipViewClicked
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
@Override
public void onToolTipViewClicked(ToolTipView toolTipView) {
onShowNextTip();
}
示例9: onShowNextTip
import com.nhaarman.supertooltips.ToolTipView; //导入依赖的package包/类
/**
* Show the next tip for this robot fragment. The tips are displayed one after another when the
* user clicks on the screen
*/
public void onShowNextTip() {
if (currentTip == null) {
setIsLastTipToShow(false);
mToolTipFrameLayout.removeAllViews();
mToolTipFrameLayout.showToolTipForView(TipsFactory.getTip(getActivity(), R.string.pin_explanation_tip_text),
getActivity().findViewById(R.id.bot_icon)).setOnToolTipViewClickedListener(onToolTipClicked);
currentTip = tips.PIN;
} else if (currentTip.equals(tips.PIN)) {
mToolTipFrameLayout.removeAllViews();
mToolTipFrameLayout.showToolTipForView(TipsFactory.getTip(getActivity(), R.string.bluetooth_tip_text),
getActivity().findViewById(R.id.connect_button)).setOnToolTipViewClickedListener(onToolTipClicked);
currentTip = tips.BLUETOOTH;
} else if (currentTip.equals(tips.BLUETOOTH)) {
mToolTipFrameLayout.removeAllViews();
mToolTipFrameLayout.showToolTipForView(TipsFactory.getTip(getActivity(), R.string.pad_tip_text),
getActivity().findViewById(R.id.right_button)).setOnToolTipViewClickedListener(onToolTipClicked);
currentTip = tips.PAD;
} else if (currentTip.equals(tips.PAD)) {
mToolTipFrameLayout.removeAllViews();
ToolTipView clawsTip = mToolTipFrameLayout.showToolTipForView(TipsFactory.getTip(getActivity(), R.string.claws_tip_text),
getActivity().findViewById(R.id.full_open_claw_button));
int margin = getResources().getDimensionPixelSize(R.dimen.claw_buttons_margin);
clawsTip.setPadding(0,0, margin, 0);
clawsTip.setPointerCenterX((int) clawsTip.getX() - getActivity().getResources().getDimensionPixelSize(R.dimen.button_press_padding));
clawsTip.setOnToolTipViewClickedListener(onToolTipClicked);
currentTip = tips.CLAWS;
} else if (currentTip.equals(tips.CLAWS)) {
mToolTipFrameLayout.removeAllViews();
mToolTipFrameLayout.showToolTipForView(TipsFactory.getTip(getActivity(), R.string.line_follower_text),
getActivity().findViewById(R.id.line_follower)).setOnToolTipViewClickedListener(onToolTipClicked);
currentTip = tips.LINE_FOLLOWER;
} else if (currentTip.equals(tips.LINE_FOLLOWER)) {
mToolTipFrameLayout.removeAllViews();
mToolTipFrameLayout.showToolTipForView(TipsFactory.getTip(getActivity(), R.string.light_avoider_text),
getActivity().findViewById(R.id.light_avoider)).setOnToolTipViewClickedListener(onToolTipClicked);
currentTip = tips.LIGHT_AVOIDER;
} else if (currentTip.equals(tips.LIGHT_AVOIDER)) {
mToolTipFrameLayout.removeAllViews();
currentTip = null;
setIsLastTipToShow(true);
mToolTipFrameLayout.setOnClickListener(null);
}
}