帮酷LOGO
0 0 评论
  • 显示原文与译文双语对照的内容
文章标签:Android 库  android-l  VIEW  TAR  MAN  Targets  目标  触摸  
Android library for manipulating view touch targets using XML only.

  • 源代码名称:ExtendedTouchView
  • 源代码网址:http://www.github.com/lnikkila/ExtendedTouchView
  • ExtendedTouchView源代码文档
  • ExtendedTouchView源代码下载
  • Git URL:
    git://www.github.com/lnikkila/ExtendedTouchView.git
  • Git Clone代码到本地:
    git clone http://www.github.com/lnikkila/ExtendedTouchView
  • Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/lnikkila/ExtendedTouchView
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    
  • ExtendedTouchView

    想要一些背景看看这个博客帖子。

    你注意到材质指南指定触摸目标有时应大于实际视图?

    查看这里对话框的按钮,例如:

    使用 TouchDelegate有点笨拙,将它抽象出来,你可以使用普通的ol xml将这些目标设置为任意大小,如:

    <com.lnikkila.extendedtouchview.ExtendedTouchView
     android:layout_width="wrap_content"android:layout_height="wrap_content"app:touchHeight="48dp">
     <Buttonandroid:id="@+id/button"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@string/button"/>
    </com.lnikkila.extendedtouchview.ExtendedTouchView>

    就是这样 !

    安装

    你可以在 JCenter 上获得编译过的库。

    把这个放到你的build.gradle 里:

    compile 'com.lnikkila:extendedtouchview:0.1.0'

    许可证

    
    ISC License (ISC)
    
    
    
    Copyright (c) 2015, Leo Nikkilä
    
    
    
    Permission to use, copy, modify, and/or distribute this software for any purpose
    
    
    with or without fee is hereby granted, provided that the 上面 copyright notice
    
    
    and this permission notice appear in all copies.
    
    
    
    THE SOFTWARE IS PROVIDED"AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    
    
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
    
    
    FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    
    
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
    
    
    OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
    
    
    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
    
    
    THIS SOFTWARE.
    
    
    
    


    文章标签:MAN  VIEW  触摸  android-l  Android 库  TAR  目标  Targets  

    Copyright © 2011 HelpLib All rights reserved.    知识分享协议 京ICP备05059198号-3  |  如果智培  |  酷兔英语