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

Java ToolTipRelativeLayout类代码示例

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

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



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

示例1: onCreateView

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

vFoldingPaneLayout = (FoldingPaneLayout) view.findViewById(R.id.vFoldingPaneLayout);
vLeftMenu = (MainFoldingView) view.findViewById(R.id.vLeftMenu);
lvTracks = (StickyListHeadersListView) view.findViewById(R.id.lvTracks);
lyTooltipframe = (ToolTipRelativeLayout) view.findViewById(R.id.lyTooltipframe);
      emptyView = view.findViewById(R.id.emptyView);
   
   strM = getResources().getString(R.string.strM);
strKm = getResources().getString(R.string.strKm);
strRecording = getResources().getString(R.string.strRecording);
   // TODO Use "injected" views...
setupView();
   return view;
  }
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:19,代码来源:AllTrackListFragment.java


示例2: displayInfo

import com.nhaarman.supertooltips.ToolTipRelativeLayout; //导入依赖的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


示例3: showNotificationEmptyMyFiles

import com.nhaarman.supertooltips.ToolTipRelativeLayout; //导入依赖的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


示例4: onCreate

import com.nhaarman.supertooltips.ToolTipRelativeLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_main);

    tileView = (TileView)findViewById(R.id.tile_view);
    tooltipLayout = (ToolTipRelativeLayout)findViewById(R.id.tooltip_layout);

    initializeTileView();
    setupFAB();
}
 
开发者ID:katanagari7c1,项目名称:EE23_FastAndroid,代码行数:13,代码来源:Main.java


示例5: onActivityCreated

import com.nhaarman.supertooltips.ToolTipRelativeLayout; //导入依赖的package包/类
/**
 * By default checks the preferences for the show tips. The onClickListener on mToolTipFrameLayout
 * is for show the tips until isLastTipToShow is set to true.
 * @param savedInstanceState
 */
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    // Retain this fragment across configuration changes.
    setRetainInstance(true);

    mToolTipFrameLayout = (ToolTipRelativeLayout) getActivity().findViewById(R.id.activity_main_tooltipframelayout);

    tipsManager = new TipsManager(getActivity(), mToolTipFrameLayout, this);
    tipsManager.initTips();

}
 
开发者ID:bq,项目名称:robopad,代码行数:19,代码来源:RobotFragment.java


示例6: onCreate

import com.nhaarman.supertooltips.ToolTipRelativeLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setContentView(R.layout.activity_show_camera_view);

    activity_show_camera_view_layout = (LinearLayout)findViewById(R.id.activity_show_camera_view_layout);
    windowManager = (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE);

    Typeface fontType = FontManager.getTypeface(getApplicationContext(), FontManager.APP_FONT);
    FontManager.markAsIconContainer(findViewById(R.id.activity_show_camera_view_layout), fontType);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
            requestPermissions(new String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA);
        }
    }

    boolean hasPermission = (ContextCompat.checkSelfPermission(this,
            Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED);
    if (!hasPermission) {
        ActivityCompat.requestPermissions(this,
                new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
                REQUEST_WRITE_STORAGE);
    }

    //pop up hint
    toolTipRelativeLayout = (ToolTipRelativeLayout) findViewById(R.id.activity_main_tooltipRelativeLayout);
    findViewById(R.id.activity_main_redtv).setOnClickListener(this);

    findViewById(R.id.activity_main_redtv).bringToFront();
    findViewById(R.id.activity_main_redtv).requestLayout();
    findViewById(R.id.activity_main_redtv).invalidate();
    toolTipRelativeLayout.bringToFront();
    toolTipRelativeLayout.requestLayout();
    toolTipRelativeLayout.invalidate();
    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            addBlueToolTipView();
        }
    }, 1100);
    //end of hint

    sb = (SubmitButton) findViewById(R.id.button);
    sb.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            touchToCapture();
            Handler handler = new Handler();
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    //過兩秒後要做的事情
                    Intent intent = new Intent();
                    intent.setClass(ShowCameraViewActivity.this, CaptureActivity.class);
                    intent.putExtra("path", last_photo_name);
                    intent.putExtra("activity", "ShowCameraViewActivity");
                    //intent.putExtra("color" , "" + mBlobColorHsv);
                    startActivity(intent);
                }
            }, 1700);
            Log.d(TAG, "onClick: Submit");
        }
    });

    Log.i(TAG, "called onCreate");
    Camera.Size resolution = null;
    mOpenCvCameraView = (CameraView) findViewById(R.id.fd_activity_surface_view);
    mOpenCvCameraView.setVisibility(CameraBridgeViewBase.VISIBLE);
    //mOpenCvCameraView.setResolution(resolution);
    mOpenCvCameraView.setCvCameraViewListener(this);
    mOpenCvCameraView.setCameraIndex(CameraBridgeViewBase.CAMERA_ID_FRONT);
}
 
开发者ID:clementf2b,项目名称:FaceT,代码行数:75,代码来源:ShowCameraViewActivity.java


示例7: onCreateView

import com.nhaarman.supertooltips.ToolTipRelativeLayout; //导入依赖的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


示例8: onClick

import com.nhaarman.supertooltips.ToolTipRelativeLayout; //导入依赖的package包/类
@Override
public void onClick(View widget) {
	TextView tv = (TextView) widget;
	Spanned s = (Spanned) tv.getText();
	if(s != null){
		int start = s.getSpanStart(this);
		int end = s.getSpanEnd(this);
		while(s.charAt(start) == '@'){
			start++;
		}
		//note: add +1 to start to skip @
		String toSearch = s.subSequence(start, end).toString();
		String toShow = null;
		//        Log.d("MyClickableSpan", "toSearch == " + toSearch);
		//        Log.d("MyClickableSpan", "toSearch.amoutChars == " + toSearch.length());
		ArrayList<MatrixItem> items = SlideoutNavigationActivity.theActiveActivity.getRootFragment().getAllMatrixReferences();
		for(MatrixItem item: items){
			//	        Log.d("MyClickableSpan", "itemName == " + item.getItemName());
			//	        Log.d("MyClickableSpan", "itemName.amoutChars == " + item.getItemName().length());
			if(item.getItemName().equals(toSearch)){
				toShow = item.getItemName() + ": " + item.getValue();
				//		        Log.d("MyClickableSpan", "valueToShow is set!");
			}
		}

		//		Toast.makeText(mBelongsTo.getActivity(), "TOAST" ,Toast.LENGTH_SHORT).show();
		//        Log.d("MyClickableSpan", "MyClickableSpan -> onClick");
		ToolTipRelativeLayout toolTipRelativeLayout = (ToolTipRelativeLayout) mainView.findViewById(R.id.activity_main_tooltipRelativeLayout);
		//if value was not found -> set another message
		if(toShow == null){
			toShow = "\"" + toSearch + "\"" + 
					mBelongsTo.getResources().getString(R.string.reference_inexistent);
		}
		ToolTip toolTip = new ToolTip()
		.withText(toShow)
		.withColor(mBelongsTo.getResources().getColor(R.color.a_green));
		//    	.withShadow();

		//
		//        Log.d("MyClickableSpan", "toolTip==null? " + (toolTip==null) + "; text == "
		//        		+ toolTip.getText());
		//first remove all other (old) tooltips
		ToolTipView toRemove = null;
		try{
			while((toRemove = activeToolTips.pop()) != null){
				toRemove.remove();
			}
		}catch(EmptyStackException e){
			//if it is emtpy -> do nothing
		}
		//now show new tooltip and add it to active list
		final ToolTipView myToolTipView = toolTipRelativeLayout.showToolTipForView(toolTip, widget);
		activeToolTips.add(myToolTipView);
		//remove the new tooltip anyway after some time
		Handler handler = new Handler();
		handler.postDelayed(new Runnable(){
			public void run(){
				myToolTipView.remove();
			}
		}, 3000);
		//    	myToolTipView.
		////    	myToolTipView.setOnToolTipViewClickedListener(MainActivity.this);
	}
}
 
开发者ID:FAU-Inf2,项目名称:rpgpack-android,代码行数:65,代码来源:MyClickableSpan.java


示例9: TipsManager

import com.nhaarman.supertooltips.ToolTipRelativeLayout; //导入依赖的package包/类
public TipsManager(Context mContext, ToolTipRelativeLayout mToolTipFrameLayout, TipsManagerListener listener) {

        this.mContext = mContext;
        this.mToolTipFrameLayout = mToolTipFrameLayout;
        this.listener = listener;

    }
 
开发者ID:bq,项目名称:robopad,代码行数:8,代码来源:TipsManager.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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