我使用Visual Studio 2015 RC创建了一个Ionic(Apache Cordova)应用程序.我在自己的解决方案文件中创建了它,我可以使用Ripple运行它.
现在我想将文件移动到与我的服务器应用程序相同的文件夹中,因此我复制了项目文件夹并将项目添加到另一个解决方案中.如果我现在尝试使用Ripple运行项目,我会收到此错误:
无法获得Ripple会话信息.例外:无法连接到远程服务器.请关闭所有Chrome实例,然后重试.
如何让Ripple再次运行?
ripple cordova visual-studio-cordova visual-studio-2015 ionic
我在这里添加评论:
PhoneGap应用程序无法在Google Ripple上运行
但鉴于我在StackOverflow上的声誉很低(和其他地方一样),我不能.该线程提出了类似的问题,但没有回答我的问题.我正在尝试测试HTML5页面的功能,该页面最终会被制作成使用PhoneGap的移动应用程序.该页面通过jQuery对JSON服务进行AJAX调用:
$(document).ready(function() {
$.ajax({
url: 'latest.json',
type: 'get',
datatype: 'json',
processData: false,
success: function(data) {
//…make it so
});
});
Run Code Online (Sandbox Code Playgroud)
并在Chrome中以HTML5完美运行.但是,当使用适用于Chrome的Ripple PhoneGap模拟时,JSON会因500错误而失败:
获取https://rippleapi.herokuapp.com/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=latest.json 500(内部服务器错误)rippleapi.herokuapp.com/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=latest.json:1
上面提到的问题的建议答案如下:
我遇到过同样的问题.当我尝试连接到IISExpress上托管的WebAPI服务时,就发生了这种情况.
在我将托管更改为本地IIS服务器之后,错误消失了(原文如此),并且我能够使用Ripple连接到我的WebAPI服务.
但是我没有在本地运行IIS或其他任何东西 - 它都是由ISP托管的远程服务器运行的.因为,正如我所说,这个页面在非仿真模式下运行正常,故障似乎是在Ripple中.任何有助于使此仿真正常运行的帮助将不胜感激.
关于如何正确使用Ripple Drawable,我有点迷茫.
假设我有这个可绘制的:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="false" android:state_focused="true" android:drawable="@color/accent_color_light" />
<item android:state_pressed="true" android:drawable="@color/accent_color_light" />
<item android:drawable="@android:color/white" />
</selector>
Run Code Online (Sandbox Code Playgroud)
因此它是一个纯白色的背景,在聚焦或按下时会变成淡蓝色.
如何获得相同的颜色但具有连锁效果?我想我需要使用一个掩码来防止它超出视图范围?
cordova create <app_name>
.cordova platform add android
cordova ripple android
.我从文档中知道我可以设置eclipse并进行构建.(我不是在寻找这个)
但我无法使用该命令创建.apk文件cordova build android
.当我运行命令时,命令行上没有输出,命令刚刚结束.我找不到.apk文件.
有没有办法从命令行创建.apk文件?(寻找其他平台的建议)
谢谢,
当我在visual studio中创建新的移动应用程序时,我可以运行它并且不会发生任何问题.
但是,当我开始运行另一个应用程序(由其他开发人员创建,并在TFS上共享)时,我收到以下消息:
Unable to get launched browser process for Ripple.
Unable to get Ripple session info for port 0.
Run Code Online (Sandbox Code Playgroud)
没有构建错误或警告!只有2条消息!!
任何的想法?
我的环境:
*编辑:
它通过右键单击解决方案资源管理器中的项目名称来工作 调试| 开始新的实例
但仍然没有按F5或单击工具栏中的运行按钮!!
我正在开发一款Android应用.最后一次使用带有锁定屏幕上显示的自定义视图的通知.不幸的是,当我像其他通知一样点击它时,我无法获得波纹和高程效果.此外,单个触摸触发我已配置的意图,而其他通知需要双击.
我在Github上放了一个最小的项目示例:
https://github.com/lpellegr/android-notification-custom-example
应用程序示例提供了两个用于发布通知的按钮:一个使用自定义视图并受到上述问题的影响,另一个通知使用具有预期行为的默认系统视图.
任何关于如何获得波纹和高程效果以及双击行为(通过保持自定义视图)的想法都是受欢迎的.
PS:我的目标是API 19+,我想使用自定义视图布局和setOnClickPendingIntent,因为只有这个监听器允许打开活动,无论设备的安全模式是什么.
在我的应用程序中,我想创建一个填充整个视图的涟漪.因为它不能正常工作我创建了一个最小的示例应用程序,并在那里尝试但没有成功.
我的布局看起来像这样:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent" android:padding="16dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ripple"
android:onClick="onViewClicked" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我的drawable定义如下:
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#1E88E5"
android:radius="0dp">
<item
android:id="@android:id/mask"
android:drawable="@android:color/white" />
</ripple>
Run Code Online (Sandbox Code Playgroud)
这是一个视频当前的样子.我希望这个圈子(我认为它正式称为热点)从middel成长,直到它填满整个圈子View
.我不是在谈论有意识地设置为0dp的纹波半径.你有什么想法我能做到这一点吗?
编辑:最后我想实现这样的目标.
对于每个不想阅读所有答案的人:我设法实现它并为此创建一个repo.可以在项目中自由使用,并向我发送拉取请求.
android ripple android-resources android-drawable rippledrawable
我正在开发一个phoneGap应用程序.当我在浏览器中测试我的应用程序时没有问题.万事如意.但是当我在涟漪中尝试它时,我的javascript无效.详细信息:用户可以登录系统,如果它成功重定向到另一个页面(使用jquery mobile),它在chrome,Internet Explorer和firefox中运行良好.但是在波纹中不起作用.我的代码如下所示:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title></title>
<link rel="stylesheet" href="css/jquery.mobile-1.3.2.css">
<script src="js/jquery-1.10.2.js"></script>
<script src="js/jquery.mobile-1.3.2.js"></script>
<script src="js/jquery.base64.js"></script>
<script src="js/cordova.js"></script>
<script type="text/javascript">
$(function() {
var credentials = 'admin:adminabc';
var authType = "Basic " + credentials;
$('#loginForm').submit(function() {
$.ajax({
type : "GET",
url : 'http://localhost:30673/api/user/Get',
data : 'json',
beforeSend : function(xhr) {
xhr.setRequestHeader("Authorization", authType);
},
success : function(data, textStatus) {
$.mobile.changePage("#menu", {
transition : "slideup"
});
}
});
});
$("#aboutUs").click(function() …
Run Code Online (Sandbox Code Playgroud) 我有我的代码:
+function($) {
'use strict';
var Ripple = function(element) {
var $this = $(this)
$(element).on('mousedown', $this.start)
}
Ripple.prototype.start = function(e) {
var $this = $(this)
var r = $this.find('.ripple-wave')
if(r.length == 0) {
$this.prepend('<div class="ripple-wave"></div>')
r = $this.find('.ripple-wave')
}
if($this.hasClass('btn') || $this.hasClass('single-action')) {
var posX = $(this).offset().left, posY = $(this).offset().top
r.css('left', e.pageX - posX)
r.css('top', e.pageY - posY)
}
r = r.parent()
r.addClass('active')
r.one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
r.removeClass('active')
})
}
var old = $.fn.ripple
$.fn.ripple = function() { …
Run Code Online (Sandbox Code Playgroud) 我想添加一些点击动画如下所示我回收的看法,但没有成功.这是我的一些代码.
在我的活动中
@Override
protected void onCreate(Bundle savedInstanceState) {
...
mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view);
ItemOffsetDecoration itemDecoration = new ItemOffsetDecoration(this, R.dimen.card_item_offset);
mRecyclerView.addItemDecoration(itemDecoration);
mLayoutManager = new LinearLayoutManager(this);
mRecyclerView.setLayoutManager(mLayoutManager);
mAdapter = new CustomAdapter(this);
mRecyclerView.setAdapter(mAdapter);
}
Run Code Online (Sandbox Code Playgroud)
在我的ViewHolder中
public CustomViewHolder(View itemView) {
super(itemView);
this.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
/* on click stuff here */
}
});
}
Run Code Online (Sandbox Code Playgroud)
在我的CardView.xml里面
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_loading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="4dp"
android:clickable="true"
android:background="?android:attr/selectableItemBackground">
<TextView
android:id="@+id/card_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
Run Code Online (Sandbox Code Playgroud)
不确定问题出在哪里,但提前感谢您帮助=)
android ripple material-design android-cardview android-recyclerview