标签: ripple

iPhone - 在UIImageView上具有Ripple效果

我试图在它被触及时在imageView上创建一个类似波纹的效果,但是我不明白如何为Windows实现OpenGL并将其移植到iOS.我试图使用http://www.codeproject.com/KB/openGL/dsaqua.aspx以及cocos2d,但我发现后者完全令人困惑.有人愿意提出一些建议或者能指出我正确的方向吗?

非常感谢!

iphone image-manipulation uiimageview ripple

8
推荐指数
3
解决办法
2万
查看次数

选定状态覆盖Android Ripple效果

在寻找一段时间之后,我无法找到答案......

我有一个带有物品的回收者视图,当选择这些物品时,它们具有红色背景和白色文本(事先背景为白色,文本为黑色).为此,我使用选择器.

我最近试图为此添加一个涟漪效果,但除非我长时间点击该项目,项目的背景直接变为红色而没有波纹.我假设这是因为选择器状态state_selected覆盖了sate_pressed上的纹波?

有谁知道有没有办法解决这个问题?这是我使用的选择器代码:

<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="@android:color/holo_red_dark" >

    <item>
        <selector xmlns:android="http://schemas.android.com/apk/res/android" >
            <item
                android:drawable="@drawable/ripple"
                android:state_pressed="true"/>
            <item
                android:drawable="@android:color/holo_red_dark"
                android:state_selected="true"/>
            <item android:drawable="@android:color/white"/>
        </selector>
    </item>

</ripple>
Run Code Online (Sandbox Code Playgroud)

提前致谢!

android ripple rippledrawable android-5.0-lollipop android-recyclerview

8
推荐指数
1
解决办法
3701
查看次数

在recyclerview中的notifydatachanged期间保持涟漪效应

我开始修改我的应用程序以支持棒棒糖.基本上,我有一个带有recyclerview的文件浏览器片段,当用户打开这个片段时,他会看到他的根目录下的所有文件夹,当用户点击我需要获取所有子文件夹+文件的文件夹并将其显示给用户使用与notifydatachanged相同的recyclerview.功能正常的问题是当用户单击文件夹时,在notifydatachanged期间不保留涟漪效应.

file_item.xml

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/file_name"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?attr/selectableItemBackground"
    android:clickable="true"
    android:drawablePadding="15dp"
    android:ellipsize="marquee"
    android:focusable="true"
    android:gravity="center_vertical"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:paddingLeft="14dip"
    android:paddingRight="15dip"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textColor="?android:attr/textColorAlertDialogListItem" />
Run Code Online (Sandbox Code Playgroud)

Recyclerview适配器:

public class RecycleAdapter extends RecyclerView.Adapter<RecycleAdapter.CustomViewHolder>{

    private List<Item> _data;
    private Context _context;
    private IFileListener _listener;

    public RecycleAdapter(Context context, List<Item> data,IFileListener listener) {
        _data = data;
        _context = context;
        _listener = listener;
    }

    public void setData(List<Item> data)
    {
        _data = data;
        notifyDataSetChanged();
    }


    @Override
    public CustomViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
        View view = LayoutInflater.from(_context).inflate(R.layout.file_item, viewGroup,false);

        CustomViewHolder viewHolder = new CustomViewHolder(view);
        return …
Run Code Online (Sandbox Code Playgroud)

android ripple android-recyclerview

8
推荐指数
1
解决办法
1143
查看次数

带有边框的涟漪TextView?

我几乎没有TextView显示在彼此旁边.目前,我用来android:background="?attr/selectableItemBackground"触摸波纹.

现在,我想TextView在未按下时为s 添加边框,并在TextView触摸时产生波纹.我怎么做?

android ripple

8
推荐指数
1
解决办法
3386
查看次数

将图像内容从相机加载到文件

我使用以下drictive使用phonegap API拍照(或从库中选择):

MyApp.directive('Camera', function () {
    return {
        restrict: 'A',
        require: 'ngModel',
        link: function(scope, elm, attrs, ctrl) {
            elm.bind('click', function() {
                navigator.camera.getPicture(function (imageURI)
                {
                    scope.$apply(function() {
                        ctrl.$setViewValue(imageURI);
                    });
                }, function (err) {
                    ctrl.$setValidity('error', false);
                },
                //Options => http://docs.phonegap.com/en/2.6.0/cordova_camera_camera.md.html#Camera
                { quality: 50,
                  destinationType:Camera.DestinationType.FILE_URI                      
                })
            });
        }
    };
});
Run Code Online (Sandbox Code Playgroud)

这给我一个看起来像的URI,使用chrome上的ripple模拟器,我可以看到粘贴这个URI.

blob:http%3A//localhost%3A8080/8e18de30-d049-4ce2-ae88-8500b444581e
Run Code Online (Sandbox Code Playgroud)

我的问题是加载此URI

$scope.updateUserProfile = function (user) {

       var myPicfile = $http.get(user.myPicture);

       dataService.uploadPicture . . . some code to update the picture to Parse

    }
Run Code Online (Sandbox Code Playgroud)

*注意:我不能与parse.com一起使用phonegap文件传输:

当我这样做时,我得到:

在此输入图像描述

我提出的要求是:

uploadPicture:function uploadPicture(user,callback){var serverUrl =' …

ripple angularjs cordova parse-platform

7
推荐指数
1
解决办法
2905
查看次数

纹波仿真器在哪里创建文件?

我在此路径上成功创建了一个带有ripple仿真器的文件:

fullPath: "/myAppFolder/myFile.txt"
Run Code Online (Sandbox Code Playgroud)

这是代码:

filesystem.root.getDirectory(
  "myAppFolder",
  { create: true, exclusive: false },
  function(dir) {
    dir.getFile(
      "myFile.txt",
      { create: true, exclusive: true },
      function(file) {
        console.log(file);
      },
      function(error) {
        console.log("error create file: " + error.code + ":" + error.message);
      }
    );
  },
  function(error) {
    console.log("error create dir: " + error.code + ":" + error.message);
  }
);
Run Code Online (Sandbox Code Playgroud)

另外我在哪里可以看到这个文件?它在硬盘上吗?

javascript google-chrome file ripple cordova

7
推荐指数
0
解决办法
132
查看次数

如何检测我的应用程序是否在Ripple Emulator上运行?

有没有办法检测我的应用程序当前是在Ripple Emulator上运行,而不是真正的设备?我想要一些解决方法代码只能在模拟器上运行.

emulation hybrid ripple cordova

7
推荐指数
2
解决办法
1382
查看次数

有背景颜色和波纹作用的机器人按钮

我有一个Android按钮,我想给它一个背景颜色和两个涟漪效果

我的涟漪xml如下.

<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:color="#BDA0CB"
    tools:targetApi="lollipop">
    <item android:id="@android:id/mask">
        <shape android:shape="rectangle">
            <solid android:color="#BDA0CB" />
        </shape>
    </item>
</ripple>
Run Code Online (Sandbox Code Playgroud)

我的按钮是

 <Button android:id="@+id/Button_activity_login_ViewProfile" style="?android:textAppearanceSmall"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:layout_marginTop="16dp" android:text="Save"
        android:textStyle="bold"
        android:layout_marginLeft="@dimen/margin_left"
        android:layout_marginRight="@dimen/margin_right"
        android:textColor="#ffffffff"
        android:fontFamily="sans-serif"
        android:background="#ff7e51c2" />
Run Code Online (Sandbox Code Playgroud)

要给出涟漪效果,我必须删除背景颜色......有没有办法可以保留两者.

android background ripple

7
推荐指数
1
解决办法
1万
查看次数

如何在android中设置带有涟漪效果的按钮背景可绘制图像

我的Xml代码:

<Button
    android:id="@+id/link_btn"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/google_btn" />
Run Code Online (Sandbox Code Playgroud)

我正在应用默认涟漪效应

<Button
    android:id="@+id/link_btn"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackground" />
Run Code Online (Sandbox Code Playgroud)

但我需要按钮的背景"@drawable/google_btn"
"?android:attr/selectableItemBackground".这意味着我需要自定义背景的涟漪效果.

android background ripple android-drawable

7
推荐指数
3
解决办法
8192
查看次数

私有区块链与Hashgraph,Ripple,BigChainDb

我一直在调查一些用例的不同区块链.最后,我得出的结论是,设置私有区块链相当于拥有一个分布式数据库,其中包含不可变性,数字签名等区块链概念.例如:Bigchaindb.(好吧,如果我们确实需要智能合约功能,那么分布式数据库可能无效)

从理论上讲,哈希图一致性算法对于公共链来说看起来不够安全.它看起来像是Ripple的紧密替代版本.

综上所述,

  1. Hashgraph,Ripple适合私人连锁店.
  2. 专用链等同于设置分布式数据库

在这里,我分享我的观点,了解私有链以何种方式优于分布式数据库?

ripple blockchain ethereum bigchaindb

7
推荐指数
1
解决办法
490
查看次数