我收到此错误:
渲染问题渲染期间引发的异常:android.graphics.drawable.VectorDrawable_Delegate.nDraw(JJJLandroid/graphics/Rect; ZZ)
我知道我可以从"N预览"版本更改为"23"并且它可以正常工作但是我必须这样做以便它能够在"预览"中工作吗?
我试过了:
首先,我已经看到了答案: 这里, 但对我来说,来自android和angular只是让人心潮澎湃,必须编写如此多的代码(在android和angular它需要一行的地方)加上答案不是最新的答案所以不知道是否现在还有更好的方法
澄清这里是我的例子:
struct User{
let fistName:String
let lastName:String
}
Run Code Online (Sandbox Code Playgroud)
我用以下方法检索数据:
Firestoer.firestore().collection("users").document('someId').getDocument{
(snapshot,error) in
}
Run Code Online (Sandbox Code Playgroud)
问题是如何使用一行代码将快照值分配给用户对象值 - 如同user = snapshot -ish一样.
如何从Firebase身份验证中检索用户列表?我可以得到'当前'用户,但就是这样.或者我是否必须先将用户添加到数据库并从那里获取列表?
android firebase firebase-authentication firebase-realtime-database
我在应用程序中很难实现“标准底表”,即我的底表是“标题”可见且可拖动的底表(参考:https ://material.io/design/components/sheets-bottom .html#standard-bottom-sheet)。更重要的是:我在任何地方都找不到它的任何示例:S。我所希望的关闭结果是通过在Scaffold中将DraggableScrollableSheet实现为bottomSheet:(仅该小部件具有initialChildSize),但是接缝像没有办法使标题“粘”,因为所有内容都是可滚动的:/。
我也发现了这一点:https ://flutterdoc.com/bottom-sheets-in-flutter-ec05c90453e7-像这样的接缝是我正在寻找的“ Persistent Bottom Sheet”部分,但没有详细说明,所以我可以并没有确切地找到实现它的方式,加上那里的评论是负面的,所以我猜这不是完全正确的...
任何人有什么解决方案吗?
只是在我的项目中从webdevelopment(来自android)开始,我试图分配变量,因为在许多教程中都提到了“:root”的帮助:
:root{
--accentColor: #20a8d8;
--primary: #96a1a5;
--secondary: #415a72;
--bgColorrr:#1e2e38;
}
Run Code Online (Sandbox Code Playgroud)
但这根本没有用。将其更改为“:host”后,它可以正常工作-有人可以解释一下:root不工作的原因是什么?
可能值得一提:我在自定义组件上使用了它(角度5),并且正在使用CoreUI(以防有些CSS出现)
ToggleButton突出于底部边框的背景。
有人可以告诉我我做错了什么吗?
我在SceneBuilder中设置了id ToggleButton。
CSS:
#blue-unselected {
-fx-border-color: #26b4d5;
-fx-border-radius: 4;
-fx-background-color: white;
-fx-background-radius: 4;
-fx-font-size:14;
-fx-text-fill: #26b4d5;
-fx-font-family: "Verdana Pro Cond SemiBold"
}
Run Code Online (Sandbox Code Playgroud) 在这里整天用这个东西杀了我自己,我有两个部门和Articals:
export class Department {
articals?: Artical[]=[];
moms?: number;
id?: string;
constructor() {
}
}
Run Code Online (Sandbox Code Playgroud)
和:
export class Artical {
moms?: number;
price: number;
name?: string;
constructor() {
}
}
Run Code Online (Sandbox Code Playgroud)
喜欢你可以看到部门包含一个'Articals'数组,所以我正在用新的articals(及其属性)构建新的部门,并试图将它添加到fireStore:
this.departmetsCollection.doc(departmentId).set(Object.assign({},
myDepartment));
Run Code Online (Sandbox Code Playgroud)
但得到错误:"函数DocumentReference.set()调用无效数据.不支持的字段值:自定义Artical对象"
Ps尝试只将部分艺术品添加到部门的路径中
doc(departmentId).set({'articals':myArticals});
Run Code Online (Sandbox Code Playgroud)
并且使用'update'而不是'set'但也没有任何帮助:S将这种对象添加到firestore是正确的?
我只是简单地查看可以更改一个月的位置:
<button class="btn btn-primary" (click)="switchToPrevMonth()"><</button>
{{currentDate|date:'MMMM'}}
<button class="btn btn-primary" (click)="switchToNextMonth()">></button>
Run Code Online (Sandbox Code Playgroud)
然后在我的.ts中:
ngOnInit() {
this.currentDate = new Date();
}
switchToNextMonth() {
this.currentDate.setMonth(this.currentDate.getMonth()+1)
this.cdRef.detectChanges()
}
switchToPrevMonth() {
this.currentDate.setMonth(this.currentDate.getMonth()-1)
this.cdRef.detectChanges()
}
Run Code Online (Sandbox Code Playgroud)
但它不会刷新日期-我通过创建在ts中使用DatePipe的方法getDate()使其工作(请参见下面的代码)并返回一个字符串,但想知道为什么第一种情况不起作用以及是否存在这种情况是使它工作的一种方法...?:s
起作用的代码:
<button class="btn btn-primary" (click)="switchToPrevMonth()"><</button>
{{getDate()}}
<button class="btn btn-primary" (click)="switchToNextMonth()">></button>
Run Code Online (Sandbox Code Playgroud)
.ts:
getDate():string{
return this.dp.transform(this.currentDate,"MMMM");
}
Run Code Online (Sandbox Code Playgroud) 首先,这对我没有帮助:属性映射不存在并且导入“rxjs”也不会
只是使用 typescript 与我的函数进行测试,并使用“async”和“await”关键字,由于某种原因,我在尝试使用地图时遇到错误,这是我的代码(顺便说一句,如果我使用“await”从 firestore 检索数据的方式不正确)如果有人纠正我,我将非常感激)-找不到很多使用 typescript/functions/firestore 的示例):
import * as functions from 'firebase-functions';
import * as admin from "firebase-admin";
admin.initializeApp(functions.config().firebase);
let db = admin.firestore();
export const helloWorld = functions.https.onRequest(
async (request, response) => {
try {
let t = await getEmployees()
response.send("yes");
} catch (e) {
response.send('no')
}
});
async function getEmployees(): Promise<any> {
try {
const f = await db.collection('companies').get().map(value => {
let id = value.id
return id;
})
} catch (e) {
return e;
} …Run Code Online (Sandbox Code Playgroud) node.js typescript google-cloud-functions google-cloud-firestore
在 YouTube 上的大多数教程中,控制台中显示的输出主要是用户自己的输出(我的意思是通过调用创建的输出
print()- 虽然我的控制台是一团糟)
有没有办法只将输出减少到我print()在 Android Studio 中调用的东西?
firebase ×3
android ×2
angular ×2
css ×2
flutter ×2
typescript ×2
angularfire ×1
angularjs ×1
bootstrap-4 ×1
bottom-sheet ×1
core-ui ×1
date-pipe ×1
java ×1
javafx ×1
node.js ×1
swift ×1
togglebutton ×1