@@ -22,39 +22,39 @@ Usage
2222
2323Example:
2424-----
25-
26- <RelativeLayout
27- xmlns:android="http://schemas.android.com/apk/res/android"
28- xmlns:tools="http://schemas.android.com/tools"
25+ ``` Java
26+ < RelativeLayout
27+ xmlns: android= " http://schemas.android.com/apk/res/android"
28+ xmlns: tools= " http://schemas.android.com/tools"
29+ android: layout_width= " match_parent"
30+ android: layout_height= " match_parent"
31+ tools: context= " .MainActivity" >
32+
33+ < ! -- Rest of Layout -- >
34+
35+ < com.haarman.supertooltips. ToolTipRelativeLayout
36+ android: id= " @+id/activity_main_tooltipRelativeLayout"
2937 android: layout_width= " match_parent"
30- android:layout_height="match_parent"
31- tools:context=".MainActivity">
32-
33- <!-- Rest of Layout -->
34-
35- <com.haarman.supertooltips.ToolTipRelativeLayout
36- android:id="@+id/activity_main_tooltipRelativeLayout"
37- android:layout_width="match_parent"
38- android:layout_height="match_parent" />
39- </RelativeLayout>
38+ android: layout_height= " match_parent" / >
39+ < / RelativeLayout >
4040
41- @Override
42- protected void onCreate(Bundle savedInstanceState) {
43- super.onCreate(savedInstanceState);
44- setContentView(R.layout.activity_main);
45-
46- ToolTipRelativeLayout toolTipRelativeLayout = (ToolTipRelativeLayout) findViewById(R.id.activity_main_tooltipRelativeLayout);
41+ @Override
42+ protected void onCreate(Bundle savedInstanceState) {
43+ super . onCreate(savedInstanceState);
44+ setContentView(R . layout. activity_main);
45+
46+ ToolTipRelativeLayout toolTipRelativeLayout = (ToolTipRelativeLayout ) findViewById(R . id. activity_main_tooltipRelativeLayout);
4747
4848 myToolTipView = toolTipRelativeLayout. showToolTipForView(
49- new ToolTip()
50- .withText("A beautiful View")
51- .withColor(Color.RED)
52- .withShadow(true)
49+ new ToolTip ()
50+ .withText(" A beautiful View" )
51+ .withColor(Color . RED )
52+ .withShadow(true )
5353 .withAnimationType(ToolTip . ANIMATIONTYPE_FROMTOP ),
54- findViewById(R.id.activity_main_redtv));
55- myToolTipView.setOnToolTipViewClickedListener(MainActivity.this);
56- }
57-
54+ findViewById(R . id. activity_main_redtv));
55+ myToolTipView. setOnToolTipViewClickedListener(MainActivity . this );
56+ }
57+ ```
5858
5959
6060ToolTip customization
@@ -95,4 +95,4 @@ License
9595 limitations under the License.
9696
9797 [ 1 ] : https://play.google.com/store/apps/details?id=com.haarman.supertooltips
98- [ 2 ] : https://github.com/nhaarman/supertooltips/tree/dev
98+ [ 2 ] : https://github.com/nhaarman/supertooltips/tree/dev
0 commit comments