【开源】supertooltips
supertooltips
- https://github.com/nhaarman/supertooltips
介绍:
SuperToolTips 是一个根据触发位置显示提示条的控件。运行效果:
![]()
使用说明:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/activity_main_redtv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" /> <com.nhaarman.supertooltips.ToolTipRelativeLayout android:id="@+id/activity_main_tooltipRelativeLayout" android:layout_width="match_parent" android:layout_height="match_parent" /></RelativeLayout>@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ToolTipRelativeLayout toolTipRelativeLayout = (ToolTipRelativeLayout) findViewById(R.id.activity_main_tooltipRelativeLayout); ToolTip toolTip = new ToolTip() .withText("A beautiful View") .withColor(Color.RED) .withShadow() .withAnimationType(ToolTip.ANIMATIONTYPE_FROMTOP); myToolTipView = toolTipRelativeLayout.showToolTipForView(toolTip, findViewById(R.id.activity_main_redtv)); myToolTipView.setOnToolTipViewClickedListener(MainActivity.this); |
posted on 2015-04-10 09:42 wasdchenhao 阅读(149) 评论(0) 收藏 举报

浙公网安备 33010602011771号