• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ToolTip类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.nhaarman.supertooltips.ToolTip的典型用法代码示例。如果您正苦于以下问题:Java ToolTip类的具体用法?Java ToolTip怎么用?Java ToolTip使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ToolTip类属于com.nhaarman.supertooltips包,在下文中一共展示了ToolTip类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addStartTipView

import com.nhaarman.supertooltips.ToolTip; //导入依赖的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;
			}
		});
	}
}
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:20,代码来源:AllTrackListFragment.java


示例2: onTouch

import com.nhaarman.supertooltips.ToolTip; //导入依赖的package包/类
@Override
public boolean onTouch(View v, MotionEvent event) {
    if(results.lastShownTooltip != null && results.lastShownTooltip.isShown()) {
        // Hide last shown tooltip
        results.lastShownTooltip.remove();
    }
    if(v != null) {
        ToolTip toolTipMinSL = new ToolTip()
                .withText(resId)
                .withColor(Color.DKGRAY)
                .withAnimationType(ToolTip.AnimationType.NONE)
                .withShadow();
        results.lastShownTooltip = results.toolTip.showToolTipForView(toolTipMinSL, v);
    }
    return false;
}
 
开发者ID:Ifsttar,项目名称:NoiseCapture,代码行数:17,代码来源:Results.java


示例3: addBlueToolTipView

import com.nhaarman.supertooltips.ToolTip; //导入依赖的package包/类
private void addBlueToolTipView() {
    ToolTip toolTip = new ToolTip()
            .withText("Select a suitable white balance and click right top button")
            .withColor(getResources().getColor(R.color.colorPrimary))
            .withAnimationType(ToolTip.AnimationType.FROM_MASTER_VIEW);

    mBlueToolTipView = toolTipRelativeLayout.showToolTipForView(toolTip, findViewById(R.id.capture_activity_redtv));
    mBlueToolTipView.setOnToolTipViewClickedListener(this);
}
 
开发者ID:clementf2b,项目名称:FaceT,代码行数:10,代码来源:CaptureActivity.java


示例4: addBlueToolTipView

import com.nhaarman.supertooltips.ToolTip; //导入依赖的package包/类
private void addBlueToolTipView() {
    ToolTip toolTip = new ToolTip()
            .withText("After face detection,Touch screen to capture photo and click the button to start processing.")
            .withColor(getResources().getColor(R.color.colorPrimary))
            .withTextColor(R.color.white)
            .withAnimationType(ToolTip.AnimationType.FROM_MASTER_VIEW);

    mBlueToolTipView = toolTipRelativeLayout.showToolTipForView(toolTip, findViewById(R.id.activity_main_redtv));
    mBlueToolTipView.setOnToolTipViewClickedListener(this);
}
 
开发者ID:clementf2b,项目名称:FaceT,代码行数:11,代码来源:ShowCameraViewActivity.java


示例5: addPauseTipView

import com.nhaarman.supertooltips.ToolTip; //导入依赖的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);
		
	}
}
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:39,代码来源:TrackDetailMapActivity.java


示例6: addStopTipView

import com.nhaarman.supertooltips.ToolTip; //导入依赖的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);
		
	}
	
}
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:33,代码来源:TrackDetailMapActivity.java


示例7: addGetSceneryTipView

import com.nhaarman.supertooltips.ToolTip; //导入依赖的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);
	}
	
}
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:30,代码来源:TrackDetailMapActivity.java


示例8: displayInfo

import com.nhaarman.supertooltips.ToolTip; //导入依赖的package包/类
private void displayInfo(){
    ToolTipRelativeLayout toolTipRelativeLayout = (ToolTipRelativeLayout) findViewById(R.id.tooltip);

    ToolTip toolTip = new ToolTip()
            .withText(R.string.file_selector_info)
            .withColor(Color.GRAY)
            .withTextColor(Color.WHITE)
            .withShadow()
            .withAnimationType(ToolTip.AnimationType.FROM_TOP);

    toolTipView = toolTipRelativeLayout.showToolTipForView(toolTip, fabInfo);
    toolTipView.setOnToolTipViewClickedListener(this);
}
 
开发者ID:SequencingDOTcom,项目名称:RTP-API-Gradle-Maven-Android-File-Selector-Java,代码行数:14,代码来源:PreFileSelectorActivity.java


示例9: showNotificationEmptyMyFiles

import com.nhaarman.supertooltips.ToolTip; //导入依赖的package包/类
/**
 * Notify that user don't has own files
 */
private void showNotificationEmptyMyFiles(){
    ToolTipRelativeLayout toolTipRelativeLayout = (ToolTipRelativeLayout) findViewById(R.id.tooltip);

    ToolTip toolTip = new ToolTip()
            .withText(R.string.empty_my_files)
            .withColor(Color.GRAY)
            .withTextColor(Color.WHITE)
            .withShadow()
            .withAnimationType(ToolTip.AnimationType.FROM_TOP);

    toolTipView = toolTipRelativeLayout.showToolTipForView(toolTip, tabHostCategory.getTabWidget().getChildTabViewAt(1));
    toolTipView.setOnToolTipViewClickedListener(FileSelectorActivity.this);
}
 
开发者ID:SequencingDOTcom,项目名称:RTP-API-Gradle-Maven-Android-File-Selector-Java,代码行数:17,代码来源:FileSelectorActivity.java


示例10: getTip

import com.nhaarman.supertooltips.ToolTip; //导入依赖的package包/类
public static ToolTip getTip(Context context, String tipText) {

        TextView tipContent = (TextView) LayoutInflater.from(context).inflate(R.layout.custom_tooltip, null);
        tipContent.setText(tipText);

        // The animation must be null because of a bug in the library at least with the compatibility libraries
        ToolTip toolTip = new ToolTip()
                .withContentView(tipContent)
                .withColor(context.getResources().getColor(R.color.holo_blue_dark))
                .withAnimationType(ToolTip.AnimationType.FROM_TOP);

        return toolTip;
    }
 
开发者ID:bq,项目名称:robopad,代码行数:14,代码来源:TipsFactory.java


示例11: onCreateView

import com.nhaarman.supertooltips.ToolTip; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_main, container, false);

    // Now find the PullMenuLayout and set it up
    mPullMenuLayout = (PullMenuLayout) rootView.findViewById(R.id.pm_layout);

    ArrayList<String> mList = new ArrayList<String>();
    mList.add("Top Stories");
    mList.add("Most Recent");
    mList.add("Interest");
    mList.add("Refresh");

    // We can now setup the PullMenuLayout
    ActionBarPullMenu.from(getActivity())
            .allChildrenArePullable()
            .listener(this)
            .setup(mPullMenuLayout,android.R.color.white,
                    getResources().getColor(R.color.menuColor),
                    getResources().getColor(R.color.progressBarColor),mList);


    SharedPreferences prefs = getActivity().getSharedPreferences("pullMenu", 0);
    String restoredText = prefs.getString("menu", null);
    if(restoredText==null) {
        TextView mTextView = (TextView) rootView.findViewById(R.id.filler_text);

        int actionBarHeight = 0;
        TypedValue tv = new TypedValue();
        if (getActivity().getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true))
        {
            actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics());
        }
        mTextView.setPadding(0,actionBarHeight , 0, 0);

        ToolTipRelativeLayout toolTipRelativeLayout = (ToolTipRelativeLayout) rootView.findViewById(R.id.tooltipframelayout);

        ToolTip toolTip = new ToolTip()
                .withText(getResources().getString(R.string.tip_descr))
                .withTextColor(getResources().getColor(android.R.color.white))
                .withColor(getResources().getColor(R.color.tip_color));

        myToolTipView = toolTipRelativeLayout.showToolTipForView(toolTip, mTextView);
    }
    return rootView;
}
 
开发者ID:ShkurtiA,项目名称:AndroidPullMenu,代码行数:48,代码来源:PullMenuFragment.java



注:本文中的com.nhaarman.supertooltips.ToolTip类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Crossing类代码示例发布时间:2022-05-22
下一篇:
Java TriggerExecutor类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap