Android Tool Tip

码农软件 · 软件分类 · Android UI 组件 · 2019-04-25 19:12:28

软件介绍

给你的Android程序添加提示条的简单类库。

使用方式:

  • 在您的build.gradle文件中添加:

    repositories {
        maven { url "https://jitpack.io" }
    } dependencies {
        compile 'com.github.xizzhu:simple-tool-tip:0.1.0' }
  • 或是在您的pom.xml文件中添加:

    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
    
    <dependency>
        <groupId>com.github.xizzhu</groupId>
        <artifactId>simple-tool-tip</artifactId>
        <version>0.1.0</version>
    </dependency>

样例:

  • 您的layout XML文件:

    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent">
        <Button         android:id="@+id/button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_gravity="center"         android:text="Click Me!" />
    </FrameLayout>
  • 您的Java代码:

    public class MainActivity extends Activity {     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);
    
            setContentView(R.layout.activity_main);
            findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {             @Override public void onClick(View v) {                 ToolTip toolTip = new ToolTip.Builder()
                        .withText("Simple Tool Tip!")
                        .build(); ToolTipView toolTipView = new ToolTipView.Builder(this)
                        .withAnchor(v)
                        .withToolTip(toolTip)
                        .build();
                    toolTipView.show();
                }
            });
        }
    }

本文地址:https://codercto.com/soft/d/4377.html

当下的启蒙

当下的启蒙

[美] 史迪芬·平克 / 侯新智、欧阳明亮、魏薇 / 浙江人民出版社 / 2018-12 / 159.90

[编辑推荐] ● 比尔•盖茨最喜爱的一本书。理查德·道金斯心中的诺贝尔文学奖作品。尤瓦尔•赫拉利2018年最爱的书之一。 ● 当代最伟大思想家史蒂芬·平克全面超越自我的巅峰之作,一部关于人类进步的英雄史诗。 ●《当下的启蒙》用数据和事实揭示出世界的真相:不是黑暗,而是光明;不是丧,而是燃;我们没有退步,而是一直在进步,还将继续进步。用这本书点燃生活的勇气,亲手创造更美好的未来。 ......一起来看看 《当下的启蒙》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具