小编sup*_*rdo的帖子

ResumableUploadAbortException:403权限不足

我正在使用Google云端存储和Google Compute Engine,并尝试从我的虚拟机上传到我的存储桶.我的存储桶具有读/写权限,任何有权访问它的人都有.他们被标记为所有者.我可以从我的桶下载很好.当我尝试上传到我的桶时,这是我得到的错误.ResumableUploadAbortException: 403 Insufficient Permission.我不确定为什么会这样?有线索吗?

google-app-engine google-cloud-storage google-compute-engine gsutil

15
推荐指数
3
解决办法
9944
查看次数

透明AlertDialog有黑色背景

我有一个自定义AlertDialog样式,使AlertDialog框透明.它工作正常,除了当我将所需的透明布局膨胀到警报对话框窗口时,它显示为黑色背景.我的目标是AlertDialog让它看起来完全透明,好像只有4个按钮浮动而不是框架.图像一是自定义对话框给我的,图像二是我想要的或我的目标.

这是自定义的代码 Dialog

<style name="CustomDialog" parent="android:Theme.Dialog">
    <item name="android:windowFrame">@null</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowTitleStyle">@null</item>
    <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
    <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
    <item name="android:backgroundDimEnabled">false</item>
    <item name="android:background">@android:color/transparent</item>
</style>
Run Code Online (Sandbox Code Playgroud)

这就是我在我的呼唤 onCreate()

AlertDialog.Builder imageDialog = new AlertDialog.Builder(TimeLine.this, R.style.CustomDialog);
inflater = getLayoutInflater();
View view=inflater.inflate(R.layout.tabs, null);![enter image description here][1]
AlertDialog a = imageDialog.create();
a.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
a.setView(view, 0, 0, 0, 0);

a.show();
Run Code Online (Sandbox Code Playgroud)

当前警报对话框

期望的AlertDialog

*编辑******选项卡布局xml的代码在这里 `

<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:id="@+id/tabLayout"
    android:background="#000000ff">

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="New Button"
        android:id="@+id/button2"
        android:layout_marginTop="206dp"
        android:layout_below="@+id/button4"
        android:layout_alignStart="@+id/button4" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" …
Run Code Online (Sandbox Code Playgroud)

android android-alertdialog

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

Google Cloud SQL"空闲IP地址"

就Cloud SQL和VM实例而言,我一直在关注控制台的计费.我发现很多成本来自Cloud SQL IP地址的闲置时间.我不确定设置的位置,因为我试图"取消分配"与我的Cloud SQL实例关联的IP地址.这些费用是否是静态的,就像我总是一样,无论如何,将不断收取IP地址的费用,或者当我不使用Cloud SQL实例时,有没有办法将其关闭?如果是的话,我该怎么办?

google-cloud-sql google-cloud-console

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

具有多个过渡的地理围栏类型集 - Android

我与Android Geofence Api混淆了.所以方法说.setTransitionTypes(int).但是,当我尝试设置我的地理围栏来监视特定地理围栏的进入和退出时,它只监视我设置它要监视的Transition的过渡类型.

这是我的代码示例

public Geofence toGeofence() {
// Build a new Geofence object
return new Geofence.Builder()
        .setRequestId(getId())
        .setTransitionTypes(getTransitionType()) //Geofence.GEOFENCE_TRANSITION_ENTER
        .setTransitionTypes(getTransitionType2())// Geofence.GEOFENCE_TRANSITION_EXIT
        .setCircularRegion(
                getLatitude(), getLongitude(), getRadius())
        .setExpirationDuration(mExpirationDuration)
        .build();}
Run Code Online (Sandbox Code Playgroud)

这只监视最后一个转换类型集,即退出转换,我已经为同一区域创建了2个地理围栏,一个监视每个转换,但我觉得这不是要走的路.有帮助吗?

android google-maps

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