我正在尝试使用后台服务为监视器创建地理围栏.地理围栏创建成功并在应用程序活动打开时工作,但在关闭应用程序地理围栏时不起作用.我现在应该怎么做.我的代码是:
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback,
GoogleApiClient.ConnectionCallbacks,
GoogleApiClient.OnConnectionFailedListener,
LocationListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
ref = FirebaseDatabase.getInstance().getReference("MyLocation");
geoFire = new GeoFire(ref);
mVerticalSeekBar = (VerticalSeekBar)findViewById(R.id.verticalSeekBar);
setUpdateLocation();
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
switch (requestCode) {
case MY_PERMISSION_REQUEST_CODE:
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { …Run Code Online (Sandbox Code Playgroud) 我有一个SheetJS的.xlsx生成的文件,但我一直没能投入border到cells.
我有这个:
我需要这个:
有没有办法做到这一点SheetJS?如果有办法应用其他单元格样式(如背景颜色),那将会很酷.
编辑:
我正在用这个功能制作纸张:
function makeSheet(wb, day){ //sheet for a specific day
var ws = XLSX.utils.table_to_sheet(document.getElementById("table"+day));
wb.SheetNames.push(day);
wb.Sheets[day] = ws;
//columns width working ok
wb["Sheets"][day]["!cols"] = [{ wpx : 70 },{ wpx : 121 }];
//wb["Sheets"][day]["A1"]["s"] = {"border":"1px"}; //I've tried this but doesn't work
return wb;
}
Run Code Online (Sandbox Code Playgroud)
编辑2
我创建了这个示例代码段,如果你可以在这里放置边框和/或其他单元格样式,那将是一个胜利:
$(document).ready(myMain);
function myMain(){
$(document).on("click","#btnexcel", function(){makeExcel()});
}
function s2ab(s) {
var buf = new ArrayBuffer(s.length);
var view = new Uint8Array(buf);
for …Run Code Online (Sandbox Code Playgroud)Ionic社交共享插件无法在iOS上运行.错误响应返回"不可用".在Android上它按预期工作.我做错了吗?
// share functions parse accepts 'app' parameter
this.socialSharing.canShareVia(app, this.property.heading, '', '', this.property.link).then(res => {
this.socialSharing.shareVia(app, this.property.heading, '', '', this.property.link);
}).catch(res => {
this.gApp.hideLoading();
this.gApp.showAlert('error', res);
});
// app name is parsed from html
<a (click)="shareVia('facebook')">facebook</a>
...
<a (click)="shareVia('viber')">viber</a>
Run Code Online (Sandbox Code Playgroud) 我有一个带有webView的Android测试应用程序,如下所示:
<WebView
android:alpha="0"
android:id="@+id/myWebView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Run Code Online (Sandbox Code Playgroud)
我的主要活动加载了一个我运行JS内容的页面.使用JS启用JS:
webSettings.setJavaScriptEnabled(true);
Run Code Online (Sandbox Code Playgroud)
我的应用程序上有一个按钮,可以将alpha值从0切换为1(显示/隐藏webView).
是否有任何"创造性"方式来检测JS方面的变化?
我试过的事情:
更新:
澄清,我正在寻找一个JS Only解决方案,实际的JS代码是在WebView环境中使用的SDK.
我无法控制Android应用程序,完全控制WebView内容.
我使用Android Image Asset Studio生成了一组图标.但是,我不知道如何将这些图标设置到我的应用程序中Cordova.
在遵循Cordova中有关图标的文档时,我只设法使用以下代码将方形图标设置为我的项目:
<platform name="android">
<!--
ldpi : 36x36 px
mdpi : 48x48 px
hdpi : 72x72 px
xhdpi : 96x96 px
xxhdpi : 144x144 px
xxxhdpi : 192x192 px
-->
<icon src="res/android/ldpi.png" density="ldpi" />
<icon src="res/android/mdpi.png" density="mdpi" />
<icon src="res/android/hdpi.png" density="hdpi" />
<icon src="res/android/xhdpi.png" density="xhdpi" />
<icon src="res/android/xxhdpi.png" density="xxhdpi" />
<icon src="res/android/xxxhdpi.png" density="xxxhdpi" />
</platform>
Run Code Online (Sandbox Code Playgroud)
但是,在Android Oreo中,应用程序的图标是圆形的,它不能在该手机上正确显示我的应用程序图标.图标在圆圈内缩小,周围有白色背景.
问题:如何将Image Asset Studio生成的圆形图标设置为Cordova项目?
我假设在marshmallow支持指纹API之前没有带OS的手机.
我的问题是:
(a)使用棉花糖发布的所有/任何三星手机都支持android指纹API
(b)操作系统升级为棉花糖的三星手机是否支持Android指纹API?
我读过这些:
在Samsung S5上使用Android 6.0 Fingerprint API时未检测到指纹扫描程序
对于Samsung Note 4,Android FingerPrint API isHardwareDetected返回false
但没有明确的答案.三星的网站还提到所有三星设备都支持Pass SDK,但没有提到android指纹API支持
android version hardware-interface samsung-mobile-sdk android-fingerprint-api
我这个文件:
我在这里克隆了最新的Cordova:https://github.com/apache/cordova-android
但是,当我按照文档中的描述运行"ant jar"时,我收到此错误:
cordova-android-master/framework/build.xml:124:找不到从/ Users/me/cordova-android-master/framework/build导入的/Users/neigaard/Library/Android/sdk/tools/ant/build.xml .XML
谷歌说这是因为ant/build.xml从Android SDK中删除了.我发现一篇帖子说我应该下载一个旧的Android SDK工具并用它替换我的SDK工具文件夹,但我依靠我的Android SDK工作和更新.
如果没有过时的Android SDK,有没有办法构建Cordova Android jar,或者在某个地方我可以下载预先构建的jar,还是有另一种方法将Cordova集成到现有的Android应用程序中?
问题:
为什么<h1>和<h2>标签font-size放在一起<article>?
输出:
然后我想也许只是我的眼睛愚弄我所以我测量了它.
我原来是相同的大小.
我看了看下面的链接(http://w3c.github.io/html/rendering.html#sections-and-headings)我才知道,那是基于层次结构,但<h1>和<h2>上层次的同一级别.
因此,<h1>应该是2em,<h2>应该是1.5em.
码:
<!DOCTYPE html>
<html>
<head>
<title>Headings</title>
<meta charset="utf-8">
</head>
<body>
<article>
<h1>This is h1.</h1>
<h2>This is h2.</h2>
<h3>This is h3.</h3>
<h4>This is h4.</h4>
<h5>This is h5.</h5>
<h6>This is h6.</h6>
</article>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 看看这个小的Android应用程序:
MainActivity.java:
package io.github.gsaga.toucheventtest;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Run Code Online (Sandbox Code Playgroud)
activity_main:
<ImageView android:layout_width="match_parent"
android:layout_height="match_parent"
android:foreground="@drawable/ic_launcher_background"
xmlns:android="http://schemas.android.com/apk/res/android" />
Run Code Online (Sandbox Code Playgroud)
指示的图像android:foreground不会显示,但如果我更改foreground为src或background中,则会显示activity_main.xml.此代码似乎遵循此处描述的说明:
https://developer.android.com/reference/android/view/View.html#attr_android:foreground
为什么android:foreground标签在上面的代码中不起作用?
注意:
minSdkVersion是的19,我正在运行这个应用程序Android 5.1(API level 22)
android ×6
cordova ×3
javascript ×3
html ×2
alpha ×1
angularjs ×1
css ×1
fill ×1
geofencing ×1
geofire ×1
google-maps ×1
html-heading ×1
html5 ×1
icons ×1
ionic3 ×1
jquery ×1
sheetjs ×1
typescript ×1
version ×1
xml ×1