小编Pri*_*han的帖子

无法在 android 的谷歌登录时选择不同的帐户

我已经为 Android 应用实现了 Google Signing。用户可以从 Google 登录按钮成功登录。

选择社交帐户时会出现此屏幕:1

所以现在用户已经通过选择他/她的帐户成功登录。

现在,用户注销并尝试使用 Google 登录按钮重新登录。

此时,他不会被要求选择帐户,他/她会自动使用他/她第一次选择的帐户登录。

在注销时我应该怎么做才能清除所选帐户的缓存。

social android login google-login

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

关闭全屏视图后,Android WebView 视频,webview 自动滚动

WebView用来显示包含文本和视频内容的网页。

它按预期正确加载和显示视频。

但是,当我进入视频的全屏视图(我实现了此处给出的全屏视频视图)然后返回时WebViewWebView自动滚动一定数量。

我该如何解决?

请提出一些想法/链接。

html android webview html5-video

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

如何在微调器中设置所选项目的颜色?

<Spinner
     android:id="@+id/spinner1"
     android:layout_width="match_parent"  
     android:layout_height="wrap_content"   
     android:layout_alignLeft="@+id/editText1F"
     android:layout_alignTop="@+id/txtLabel1F" 
     android:entries="@array/cat_array"  
     android:prompt="@string/cat_promt" 
     android:textColor="#ffffff"                            
   />
Run Code Online (Sandbox Code Playgroud)

我的背景是黑色的,显示的项目是灰色背景和黑色字体颜色。但是当涉及到选定的字体时,它会将字体显示为黑色,因此看不到它。我如何改变它的颜色?

xml android spinner

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

Android 应用程序中视频处理的实时预览

我正在构建一个视频编辑应用程序,目前我正在使用ffmpeg进行编码和解码过程(我的应用程序可以轻松执行不需要实时预览的任务,例如反转视频或应用黑白等过滤器或选择视频中的特定帧和一些音频任务等)但问题是,如果用户想要调整视频的亮度或对比度,他们需要实时预览视频,但这不受 ffmpeg 支持 ffmpeg需要在预览之前对视频进行编码, 所以我的问题是如何我可以用ffmpeg实现实时预览吗

提前致谢(抱歉问题中存在与语法相关的问题)

video android ffmpeg

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

如何在 Spark 工作线程上调试映射函数中的错误?

我是 Spark 的新手并试图找到自己的方式。

我有一个 spark 应用程序,它在dataset 上运行一个复杂的 map 函数。此地图功能可能会因主要与数据相关的原因而失败。我怎样才能得到一些关于出了什么问题的有意义的信息?我不知道从哪里开始。

非常感谢!

apache-spark pyspark

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

CoordinatorLayout内部的RecyclerLayout scrollToPosition可见性

我正在使用内部带有AppBarLayoutCoordinatorLayout和一个元素来尝试在滚动RecyclerView时能够滚动。在此之前,一切都按预期进行,当我以编程方式尝试滚动RecyclerView的最后位置时,问题就来了。该recyclerViews不滚动,但是位置我告诉滚动到是不可见的(事实上,如果我滚动手动,它是可见的,一旦里面的其他元素AppBarLayout屏幕已经完全滚出)。 这是我的代码:

 <android.support.design.widget.CoordinatorLayout 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.support.design.widget.AppBarLayout
                android:id="@+id/app_bar_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:elevation="0dp">

                <com.github.mikephil.charting.charts.BarChart
                    android:id="@+id/chart"
                    android:layout_width="match_parent"
                    android:layout_height="280dp"
                    android:layout_below="@+id/toolbar_conso"
                    android:background="@color/background_dark_grey"
                    app:layout_scrollFlags="scroll|enterAlways" />

            </android.support.design.widget.AppBarLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_behavior="@string/appbar_scrolling_view_behavior">

                <LinearLayout
                    android:id="@+id/linear_total_conso"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/current_consumption"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text=""
                        android:textColor="@color/graph_consumption_color"
                        android:textSize="30sp" />

                    <TextView
                        android:id="@+id/consumption_unit"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="5dp"
                        android:layout_marginStart="5dp"
                        android:text=""
                        android:textAppearance="@style/TextAppearance.Smartlink.Large"
                        android:textColor="@color/graph_consumption_color" />
                </LinearLayout>

                <android.support.v7.widget.RecyclerView
                    android:id="@+id/recycler_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal" />
            </LinearLayout>
        </android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)

以及RecyclerView的代码:

    recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    recyclerView.setLayoutManager(new LinearLayoutManager(context));
    recyclerView.setAdapter(adapter);
Run Code Online (Sandbox Code Playgroud)

该适配器是一个简单的文本适配器........

当我尝试滚动是从Service接收到事件后,因此有一个BroadcastReceiver可以接收事件并管理结果:

    @Override …
Run Code Online (Sandbox Code Playgroud)

android android-layout

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

Android评分栏仅显示一星

我为RatingBar创建了自定义样式,将样式应用于评级栏时,它仅显示一颗星,并且在RatingBar的属性中,我还定义了起点的大小5,但在运行时它仅显示一星。注意:我正在使用ActionbarActivity,因为我正在显示RatingBar,但是当我仅使用Activity类时,它将显示5星,并且主题也适用于此。所以请帮我解决这个问题。

android android-actionbar ratingbar

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