Android Tool Tip
- 授权协议: Apache
- 开发语言: Java
- 操作系统: Android
- 软件首页: https://github.com/xizzhu/simple-tool-tip
软件介绍
给你的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(); } }); } }
深入理解并行编程
[美] Paul E.Mckenney(保罗·E·麦肯尼) / 谢宝友 鲁阳 / 电子工业出版社 / 2017-7-1 / 129
《深入理解并行编程》首先以霍金提出的两个理论物理限制为引子,解释了多核并行计算兴起的原因,并从硬件的角度阐述并行编程的难题。接着,《深入理解并行编程》以常见的计数器为例,探讨其不同的实现方法及适用场景。在这些实现方法中,除了介绍常见的锁以外,《深入理解并行编程》还重点介绍了RCU的使用及其原理,以及实现RCU的基础:内存屏障。最后,《深入理解并行编程》还介绍了并行软件的验证,以及并行实时计算等内容......一起来看看 《深入理解并行编程》 这本书的介绍吧!
