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

Algorithms and Theory of Computation Handbook

Algorithms and Theory of Computation Handbook

Mikhail J. Atallah (Editor) / CRC-Press / 1998-09-30 / USD 94.95

Book Description This comprehensive compendium of algorithms and data structures covers many theoretical issues from a practical perspective. Chapters include information on finite precision issues......一起来看看 《Algorithms and Theory of Computation Handbook》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试