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://www.codercto.com/soft/d/4377.html

Haskell

Haskell

Simon Thompson / Addison-Wesley / 1999-3-16 / GBP 40.99

The second edition of Haskell: The Craft of Functional Programming is essential reading for beginners to functional programming and newcomers to the Haskell programming language. The emphasis is on th......一起来看看 《Haskell》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器