小编Mah*_*our的帖子

使用搜索选项创建选择框

我想复制你在这张图片中看到的内容. 在此输入图像描述

我希望能够在框上方的文本字段中键入或直接单击该选项.

最好的方法是什么?是否存在任何相关的引导程序?

html javascript css jquery html-select

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

React-native如何在textinput上移动屏幕

我有一个使用react-native创建的登录屏幕.

当用户输入textInput时,如何将屏幕移开?

我是否会听取onFocus()事件并使用css样式来更改视图的样式?

javascript reactjs react-native

17
推荐指数
4
解决办法
3万
查看次数

如何解决错误在使用react-native构建APK时无法执行aapt?

我已经构建了一个react-native应用程序.它在Android模拟器上工作正常,现在我想生成一个APK.我已经按照文档执行此操作,这里可以看到我使用命令

./gradlew assembleRelease

构建apk但我在构建APK时遇到错误.我已经检查了关于该主题的各种堆栈溢出问题,包括 这个也是这个github问题.我已经包括了这条线

android.enableAapt2 = FALSE

应用程序级build.gradle文件如下所示

apply plugin: "com.android.application"

import com.android.build.OutputFile

/**  * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets  * and bundleReleaseJsAndAssets).  * These basically call `react-native bundle` with the correct arguments during the Android build  * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the  * bundle directly from the development server. Below you can see all the possible …
Run Code Online (Sandbox Code Playgroud)

android apk react-native

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

在配置 react-native-maps 中获取 "supportLibVersion" 、 "playServicesVersion" 和 "androidMapsUtilsVersion" 值

我正在安装react-native-maps. 在安装指南中,在第 3.1 节的Android上的构建配置中,它显示:

buildscript {
    ext {
        buildToolsVersion = "xxx"
        minSdkVersion = xxx
        compileSdkVersion = xxx
        targetSdkVersion = xxx
        supportLibVersion = "xxx"
        playServicesVersion = "xxx" // or set latest version
        androidMapsUtilsVersion = "xxx"
    }
}
...
Run Code Online (Sandbox Code Playgroud)

我怎样才能得到 supportLibVersion,playServicesVersionandroidMapsUtilsVersion值?

javascript google-play-services react-native react-native-android react-native-maps

14
推荐指数
2
解决办法
8675
查看次数

如何在Alert函数上调用onPress中的方法[React-Native]

如何在Alert函数上调用onPress中的方法[React-Native]

<Button
  onPress={{() => Alert.alert(
    'Alert Title',
    'alertMessage',
    [
      {text: 'Cancel', onPress: () => console.log('Cancel Pressed!')},
      {text: 'OK', onPress: () => {this.onDeleteBTN}},

    ],
    { cancelable: false }
  )}}
  >
      <Text> Delete Record </Text>
</Button>
Run Code Online (Sandbox Code Playgroud)

在Alert Dialog上按OK按钮后我需要打电话

onDeleteBTN = () => {
    alert(' OnDelete');
}
Run Code Online (Sandbox Code Playgroud)
{text: 'OK', onPress: () => {this.onDeleteBTN.bind(this)}},
{text: 'OK', onPress: () => {this.onDeleteBTN}},
Run Code Online (Sandbox Code Playgroud)

这不行


javascript reactjs react-native react-native-android react-native-ios

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

React Native Maps:在react-native-maps中使用Custom Marker不显示Markers图像

我正在使用react-native-maps但是我遇到了一个问题,经过大量谷歌搜索没有回答让我在这里问.我正在尝试使用自定义标记作为地图中的标记,如下图所示

在此输入图像描述

  • 当我搜索时,我发现需要使用Custom Marker来完成制作者的设计,然后我创建了一个Custom Marker组件

    import React, { Component } from "react";
    import { View } from "react-native";
    import {
    Text,
    Left,
    Right,
    Thumbnail,
    } from "native-base";
    const defaultEmployeeLogo = require("../../../assets/defualtEmployee.png");
    class CustomMarker extends Component {
    render() {
        return (
        <View style={{ flexDirection: 'row', width: 140, height: 60, 
          borderRadius: 70, backgroundColor: 'orange' }}>
            <Left>
                <Thumbnail source={defaultEmployeeLogo} />
            </Left>
            <Right>
                <Text style={{
                    color: '#fef',
                    fontSize: 13,
                    paddingBottom: 2,
                    fontFamily: 'Roboto',
                    alignItems: 'center',
                    paddingRight: 10
                }}>Mohammad</Text>
            </Right></View >);
       }
    }
    export …
    Run Code Online (Sandbox Code Playgroud)

android google-maps react-native react-native-maps

12
推荐指数
2
解决办法
5878
查看次数

多个dex文件定义Lcom/google/android/gms/internal/measurement/zzabn

从今天早上起,我无法构建我的Android应用,因为我收到此错误

  • 出了什么问题:任务执行失败':app:transformDexArchiveWithDexMergerForDebug'.

    com.android.build.api.transform.TransformException:com.android.dex.DexException:多个dex文件定义Lcom/google/android/gms/internal/measurement/zzabn;

我已经尝试将Firebase版本相应地提升到15.0.2,但后来又出现了其他错误......

任务:app:processDebugGoogleServices找到com.google.android.gms:play-services-maps:15.0.0,但google-services插件需要15.0.2版.

com.google.android.gms:play-services-maps:15.0.2甚至还没有发布?

我有一个推动生产的构建,构建应用程序的最佳方法是什么?

android dex firebase android-studio android-studio-3.0

10
推荐指数
1
解决办法
9586
查看次数

React Native Maps重叠标记

React-Native-Maps当我点击它们时,我使用和我的地图标记引脚相互重叠,我可以选择想要的那个吗?

我已将此库用于Web端.

在此输入图像描述

markerclusterer react-native react-native-maps

10
推荐指数
1
解决办法
516
查看次数

在 Windows 上安装 Memcached

在进行一些 Web 开发时,我需要在本地计算机上安装 Memcached(源代码)以密切模拟服务器上发生的情况。

如何在 Windows 上安装 Memcached?

windows installation memcached

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

React Native Maps:自定义标记在 android 上导致极度滞后和变慢

我在地图上加载了大约 2000 个标记。它在前几秒钟工作正常,但随后急剧减速。要修复它,我需要清除应用程序数据,然后它只能像以前一样工作几秒钟。

const mapMarkers = [
    {id: 1, code: "603778", lat: 35.761791, lng: 51.389438},
    {id: 2, code: "788621", lat: 35.712278, lng: 51.361785},
    {id: 3, code: "129667", lat: 35.674757, lng: 51.485328},
    {id: 4, code: "999646", lat: 35.772885, lng: 51.446735},
    {id: 5, code: "111524", lat: 35.755656, lng: 51.446774},
    //...
];

let markers = mapMarkers.map(marker => {
    return (<Marker
        key={marker.code}
        coordinate={{latitude: marker.lat, longitude: marker.lng}}
        image={require('./images/markers.png')}
        onPress={() => console.log("pressed")}
    />)
});
Run Code Online (Sandbox Code Playgroud)

我测试了emulator并且physical device两者都有问题。

提示:我将react-native-map-clustering包用于标记集群。

google-maps react-native react-native-android react-native-maps react-native-map-clustering

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