小编Arv*_*iya的帖子

如何创建下拉列表并绑定来自服务器的数据

我对 Angular 很陌生。我有一些关于 Angular 的工作。

我需要Json通过调用 Rest Api 为来自服务器的数据绑定嵌套下拉列表。

数据具有一个属性级别,指定组层次结构中的级别。Parent 将具有 Immediate Child=1Grandchild=2依此类推。Child并且Grandchild有 Group 字段,它显示在哪个父菜单中,子菜单将在那里。

我试过它来开发,但我发现所有bootstrap带有静态数据的示例html文件和单独的CSS文件,这对我来说很复杂。

我想动态地使用TypeScript. 我怎样才能开始研究它。

html typescript angular

15
推荐指数
1
解决办法
2313
查看次数

How to use Android App Bundles-Dynamic Features with visual studio 2017

In Google Play Console I came across

App size savings using the Android App Bundle-

Your app could be 38.4% smaller if you used the Android App Bundle. The APKs generated from the app bundle give your users smaller, more optimized downloads. Learn how

This calculation is based on your latest production release and the XXHDPI ARMv7 device configuration.

这一切都与减少apk文件的大小有关,它声称具有许多好处,例如使应用程序保持更小尺寸,为用户提供所需的功能和配置,通过消除构建和发布多个APK的需求来降低开发复杂性。

我们可以使用Visual Studio为Xamarin开发相同的东西吗?

android visual-studio xamarin.android xamarin

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

发送推送通知时出现“错误”:“ InvalidRegistration”

我正在使用FirebasePushNotificationPlugin中实现FCM推送通知 Xamarin.Forms。在iOS项目中,AppDelegateRegisteredForRemoteNotifications方法调用deviceToken生成时,但是当我发送token由邮递员生成的通知时,出现错误。

{“ multicast_id”:8631208504861228784,“ success”:0,“ failure”:1,1,“ canonical_ids”:0,“ results”:[{“ error”:“ InvalidRegistration”}]}

这是我AppDelegate这里得到的代码:

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
    global::Xamarin.Forms.Forms.Init();
    LoadApplication(new App());

    FirebasePushNotificationManager.Initialize(options, new NotificationUserCategory[]
    {
        new NotificationUserCategory("message",new List<NotificationUserAction> {
            new NotificationUserAction("Reply","Reply",NotificationActionType.Foreground)
        }),
        new NotificationUserCategory("request",new List<NotificationUserAction> {
            new NotificationUserAction("Accept","Accept"),
            new NotificationUserAction("Reject","Reject",NotificationActionType.Destructive)
        })
    });

    return base.FinishedLaunching(app, options);
}

public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
    FirebasePushNotificationManager.DidRegisterRemoteNotifications(deviceToken);
    Console.WriteLine("Token- - - :  "+deviceToken);
}

public override void …
Run Code Online (Sandbox Code Playgroud)

xamarin.ios ios xamarin xamarin.forms firebase-cloud-messaging

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

agm/core 和 Angular/google-maps 对于谷歌地图有什么区别

在我的 Angular 应用程序中,我需要添加google map. 我遇到了两个库,不知道该使用哪一个

npm install @angular/google-maps
npm install @agm/core --save
Run Code Online (Sandbox Code Playgroud)

谁能告诉我哪一个是最新的并且易于开发,或者两者都是相同的。

我想开发这种类型的地图

  • 没有垂直线和水平线的地图
  • 我应该能够改变背景颜色
  • 当我缩放时,国家/地区应该显示城市
  • 我应该能够在特定位置显示圆圈

在此输入图像描述

google-maps angular agm

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

应用程序终止时,通知点击时不会打开特定视图

我在工作的推送通知Xamarin.Forms使用Plugin.FirebasePushNotification.当应用终止(从任务栏中杀死)时,通知不会打开特定视图.

当应用程序打开或在后台打开时,我可以在单击通知时导航到特定页面.这是Application类

public class AppClass : Android.App.Application, Android.App.Application.IActivityLifecycleCallbacks
{
    public override void OnCreate()
    {
        base.OnCreate();
        RegisterActivityLifecycleCallbacks(this);
        FirebasePushNotificationManager.Initialize(this,false,true);
        var instanceid = FirebaseInstanceId.Instance.Token;
    }
}
Run Code Online (Sandbox Code Playgroud)

MainActivity类

protected override void OnCreate(Bundle savedInstanceState)
{
    TabLayoutResource = Resource.Layout.Tabbar;
    ToolbarResource = Resource.Layout.Toolbar;
    base.OnCreate(savedInstanceState);
    global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
    LoadApplication(new App());
}

protected override void OnNewIntent(Intent intent)
{
    base.OnNewIntent(intent);
    FirebasePushNotificationManager.ProcessIntent(this, intent);
}
Run Code Online (Sandbox Code Playgroud)

共享项目中的App.xaml.cs类

protected override void OnStart()
{
    CrossFirebasePushNotification.Current.OnNotificationOpened += (s, p) =>
    {
        if (p.Data.ContainsKey("color"))
        {
        Device.BeginInvokeOnMainThread(() =>
        {
            Xamarin.Forms.Application.Current.MainPage.Navigation.PushModalAsync(new Page1()
            {
                BackgroundColor = Color.FromHex($"{p.Data["color"]}") …
Run Code Online (Sandbox Code Playgroud)

android firebase xamarin xamarin.forms firebase-cloud-messaging

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

Xamarin.Forms:在 TabbedPage 选项卡中更改图标和文本大小

我正在使用 TabbedPage 在xaml. 默认选项卡图标和文本大小很大,所以我需要减小图标和文本的大小。下面是我main.xaml设置图标的代码。

<TabbedPage  xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"              
             xmlns:local="clr-namespace:TabbedApp">
    <local:DairyTabs Icon="dairy" HeightRequest="10" WidthRequest="10" ></local:DairyTabs>
    <local:Mykid Icon="kid" ></local:Mykid>
    <local:Event Icon="about"></local:Event>    
</TabbedPage>
Run Code Online (Sandbox Code Playgroud)

这是选项卡的第一页,我将选项卡的标题指定为 Title="Dairy"

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"              
             Title="Dairy"> 
    <ContentPage.Content>
        <StackLayout>
            <Button x:Name="btnDemo" Text="Go for 2nd page"></Button>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>
Run Code Online (Sandbox Code Playgroud)

请参阅下面的屏幕截图,您可以在其中看到图标和标签文本。

在此处输入图片说明

xaml xamarin xamarin.forms tabbedpage

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

Exe 安装抛出错误模块应包含程序集清单 .Net Core

我已经实现了windows service使用.Net Core worker service. 从命令提示符安装服务时出现错误

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>InstallUtil.exe D:\LC\WindowService\L3WorkerService.exe
Microsoft (R) .NET Framework Installation utility Version 4.8.3752.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 
'file:///D:\LC\WindowService\L3WorkerService.exe' or one of its dependencies. 
The module was expected to contain an assembly manifest..
Run Code Online (Sandbox Code Playgroud)

我尝试过这两条路径

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>InstallUtil.exe D:\LC\WindowService\L3WorkerService.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319>InstallUtil.exe D:\LC\WindowService\L3WorkerService.exe
Run Code Online (Sandbox Code Playgroud)

这是我的项目信息

  • 平台目标 - x86
  • 输出类型 - WindowsApplication
  • 目标框架 - .NET Core 3.1

我该如何解决这个问题?

.net c# windows-services .net-core

6
推荐指数
1
解决办法
5364
查看次数

使用智能手表进行信标检测

我刚刚开始从事信标工作。你能告诉我一件事吗,是否可以在没有手机的情况下通过手表检测到信标?哪种智能手表可以?

estimote apple-watch beacon wear-os

5
推荐指数
1
解决办法
1663
查看次数

有没有可以扫描BLE信标的可穿戴设备?

这个想法是从手表扫描信标,然后将数据发送到手机。然后手机应用程序将估计手表的位置。

我猜 Android Wear 提供了这个功能,但最便宜的型号是 Sony SmartWatch 3,售价 130 美元。当前的 Pebble API 是否支持手表的 BLE 扫描?

android sony-smartwatch pebble-watch ibeacon wear-os

5
推荐指数
1
解决办法
1472
查看次数

Xamarin Form 中的 PinchGesture 像 Instagram 移动提要屏幕一样缩放

我正在尝试在 xamarin 跨平台应用程序中实现类似的缩放功能,例如 Instagram 移动应用程序提要屏幕。实际上我想ImageViewListView单元格内部添加捏合手势,如果用户捏合图像,它应该放大ListView。一旦用户松开捏它应该自动调整到原始大小并适合单元格。
帮助我并提供解决方案。

以下示例代码工作但它在单元格内缩放,它不像 Instagram 缩放重叠/叠加效果。

XAML 代码

<ListView x:Name="listView" ItemSelected="PlayerList_OnItemSelected"  HasUnevenRows="false" RowHeight="300" BackgroundColor="#F6F3F6" 
RelativeLayout.XConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Width, Factor=0}" 

RelativeLayout.YConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Height, Factor=.09}"

RelativeLayout.HeightConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Height, Factor=.91}"

RelativeLayout.WidthConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Width, Factor=1}">
<ListView.ItemTemplate>
    <DataTemplate>
<ViewCell >
<Frame Margin="5" Padding="5"  OutlineColor="White" HasShadow="true">

<RelativeLayout >
<Label Font="Bold,20" Text="{Binding name}" TextColor="Black"
        RelativeLayout.YConstraint="{ConstraintExpression 
        Type=RelativeToParent,
        Property=Height,
        Factor=.0}"
        RelativeLayout.XConstraint="{ConstraintExpression 
        Type=RelativeToParent, 
        Property=Width, 
        Factor=.02}"
        RelativeLayout.WidthConstraint="{ConstraintExpression 
        Type=RelativeToParent, 
        Property=Width,
        Factor=.9}"/>

    <local:PinchToZoomContainer RelativeLayout.WidthConstraint="{ConstraintExpression
        Type=RelativeToParent,
        Property=Width, 
        Factor=1}"
        RelativeLayout.XConstraint="{ConstraintExpression
        Type=RelativeToParent,
        Property=Width, 
        Factor=0}" …
Run Code Online (Sandbox Code Playgroud)

c# zooming pinch xamarin xamarin.forms

5
推荐指数
0
解决办法
411
查看次数