小编Ali*_*med的帖子

禁用youtube api的全屏

我有一个带有片段的应用程序,在这些片段中我有框架布局,我添加了YouTubePlayerSupportFragment.但是当我点击全屏时会抛出此异常:

java.lang.RuntimeException:无法启动活动ComponentInfo {com.example.xxx/com.example.xxx.MainActivity}:java.lang.IllegalArgumentException:找不到id 0x7f040039的视图(com.example.xxx:id/frame_youtube)片段YouTubePlayerSupportFragment {4282a068#11 id = 0x7f040039}

youtube android fullscreen

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

具有约束布局的 NestedScrollView 不滚动

我的 xml 由一个约束布局组成。其中有 2 个按钮和 1 个嵌套滚动视图。里面ScrollView有各种元素,包括回收视图。我希望回收视图不滚动,而只滚动嵌套的滚动视图。我在此模式 ( recyclerView.setNestedScrollingEnabled(false);) 中禁用了回收视图的滚动,但问题是嵌套滚动视图不滚动。你能帮助我吗?我附上下面的代码。

代码以这种模式开始:

<?xml version="1.0" encoding="utf-8"?>

<android.support.constraint.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <TextView
    android:id="@+id/azzera"
    android:layout_width="120dp"
    android:layout_height="40dp"
    android:layout_marginStart="40dp"
    android:layout_marginBottom="28dp"
    android:background="@drawable/rounded_4lati"
    android:backgroundTint="@color/azzurro"
    android:elevation="@dimen/dimen8"
    android:paddingTop="@dimen/dimen8"
    android:text="@string/azzera"
    android:textAlignment="center"
    android:textColor="#FFFFFF"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintStart_toStartOf="parent" />

<TextView
    android:id="@+id/conferma"
    android:layout_width="120dp"
    android:layout_height="40dp"
    android:layout_marginEnd="16dp"
    android:layout_marginBottom="28dp"
    android:background="@drawable/rounded_4lati"
    android:backgroundTint="@color/azzurro"
    android:paddingTop="@dimen/dimen8"
    android:text="@string/conferma"
    android:textAlignment="center"
    android:textColor="#FFFFFF"
    android:elevation="@dimen/dimen8"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent" />

<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    >

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <View
            android:id="@+id/view1"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:background="@color/white"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <View
            android:id="@+id/view2" …
Run Code Online (Sandbox Code Playgroud)

android android-recyclerview android-nestedscrollview android-constraintlayout

5
推荐指数
2
解决办法
3907
查看次数

使用 RxJava 和 Retrofit 实施 Room

我正在尝试将 Room 与 RxJava 和 Retrofit 结合使用,在您建议使用组件拱门之前(在这种情况下不可能,该项目已完成 50%,只需继续清理拱门)。

所以问题是这样的。我有一个返回POJO 的网络服务。像这样的东西:

{
 "success":"true",
 "message":"message",
 "data":{[
   "id":"id",
   "name":"name",
   "lname":"lname",
 ]} 
}
Run Code Online (Sandbox Code Playgroud)

POJO 更复杂,但对于这个例子来说这是可以的。我需要这样做,因为我的视图进行查询以从房间调用数据,但如果我的数据库中没有数据,则调用我的 Web 服务,我的 Web 服务的响应将转换为实体并保存在我的数据库(房间)中并在返回后我的观点的数据列表。

我正在使用干净的拱门。我很感激任何帮助。再次不尝试使用

数据布局

  • 数据库
  • 网络
  • 存储库

领域

  • 互动者
  • 回调

推介会

  • 主持人
  • 看法

POJO API 响应

{
 "success":"true",
 "message":"message",
 "data":{[
   "id":"id",
   "name":"name",
   "address":"address",
   "phone":"phone",
 ]} 
}
Run Code Online (Sandbox Code Playgroud)

我的数据库实体

@Entity(tableName = "clients")
    public class clients {

    String id;
    String name;
    String address;
    String phone;
    String status;


    public String getId() {
        return id;
    }

    public void …
Run Code Online (Sandbox Code Playgroud)

android retrofit2 clean-architecture rx-java2 android-room

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

App bundle (.abb) 大小比APK (.apk) 大,不应该是相反的吗?

代码实际上是一样的,我只是添加了一个类,是不是因为当 Bundle 安装在设备中时,它的一部分将转到该设备并且它的大小会更小?

在此处输入图片说明

android

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

无法读取Firebase动态链接的未定义属性“清单”

我遵循了firebase为我的应用程序创建动态链接的文档。https://firebase.google.com/docs/auth/web/cordova

我的社交媒体登录功能(Google,Facebook等)已经集成到我的Firebase帐户中。基于我在这里阅读的内容:https : //github.com/firebase/firebaseui-web/issues/195

如果未在Firebase中设置动态链接,则Firebase社交媒体登录名可能不会重定向回应用程序。因此,我采用了这种解决方案,以便可以将其重定向回我的应用程序。

但是,它返回了一个错误,说:

Android Studio项目检测到配置文件res / values / facebookconnect.xml,请求在C:\ Users \ Kyle Louise Villar \ QuickEApp \ platforms \ android \ res \ values \ facebookconnect.xml中找不到更改,而忽略配置文件res / values / facebookconnect .xml请求在C:\ Users \ Kyle Louise Villar \ QuickEApp \ platforms \ android \ res \ values \ facebookconnect.xml中找不到更改,忽略了在Android上准备Firebase无法读取未定义的属性“清单”

我的密码

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.codelean.quicke" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>QuickEApp</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
    <content src="index.html" />
    <access origin="*" /> …
Run Code Online (Sandbox Code Playgroud)

redirect android cordova firebase ionic-framework

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