小编the*_*bie的帖子

自动更新谷歌播放

几小时前我刚刚在google play上发布了我的应用程序.当然,我不希望它在谷歌播放中显示出来.也许我要等24小时.

事情是我记得我看到了这个,但不知道在哪里,因为它不在这里http://developer.android.com/tools/publishing/versioning.html并且不确定它是否属实.每当我通过更改高于之前的版本代码更新我在Google Play上的应用程序时,谷歌播放是否通过通知通知通知所有下载我的应用程序的用户?

例如,从versioncode = 1到versioncode = 2?谷歌做这个或我是否必须以编程方式通知用户如果theres并更新?谢谢!

android google-play

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

滚动条中startScroll背后的逻辑?

startScroll()在这个文档中没有想到.

它说:

正数会将内容滚动到左侧.

我不明白.如果0总是在左侧,为什么向左滚动?如果是否定的,它将滚动到右侧.

但为什么?我很难绕过它.它背后的逻辑是什么?为什么要向左转?

在游戏和图形编程中,0将始终为左上角或左下角,但它始终位于左侧.因此,使用正数向右移动并以负数向左移动是有意义的.但是为什么它在startScroll上有所不同?

我只是问为什么我真的好奇为什么这样设计它.

android scrollview android-scrollview android-view

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

Firebase Crashlytics 无法发送报告。设置仅在发布风格上不可用

我设法让 firebase crashlytics 工作,问题是,它只能在调试中工作。我不知道发布版本有什么问题。我在发布版本的构建 gradle 中没有做任何特别的事情。这是错误

2020-01-16 11:28:06.478 26363-26411/? W/CrashlyticsCore: Cannot send reports. Settings are unavailable.
2020-01-16 11:28:06.478 26363-26363/? D/CrashlyticsCore: Crashlytics completed exception processing. Invoking default exception handler.
2020-01-16 11:28:06.496 3161-3175/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.sonyericsson.crashmonitor/.receiver.CrashMonitorServiceBroadcastReceiver
2020-01-16 11:28:06.599 19566-19566/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1531 android.content.ContextWrapper.startService:664 android.content.ContextWrapper.startService:664 com.sonyericsson.crashmonitor.receiver.CrashMonitorServiceBroadcastReceiver.onReceive:54 android.app.ActivityThread.handleReceiver:3386 
2020-01-16 11:28:06.626 3161-3175/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has …
Run Code Online (Sandbox Code Playgroud)

android firebase crashlytics

6
推荐指数
0
解决办法
352
查看次数

Android通知频道声音不起作用

我知道有很多关于这个问题的帖子。我已经尝试了所有。这是我所做的步骤。

首先,我发现创建频道后就无法更改。唯一的方法是重新安装该应用程序。这就是我所做的,但没有奏效。

其次,有人说我可以删除频道,所以我也使用这段代码

val channelList = mNotificationManager.notificationChannels
        var i = 0
        while (channelList != null && i < channelList.size) {
            Log.d("channelList","channel ID is ${channelList[i].id}")
            //mNotificationManager.deleteNotificationChannel(channelList[i].id)
            i++
        }
Run Code Online (Sandbox Code Playgroud)

然后在删除后重新创建频道。

第三,我尝试使用新的通知频道,但是每次使用新频道时,都会出现错误。

这是我尝试使用的所有解决方案的代码

 val audioAttributes = AudioAttributes.Builder()
                .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
                .setUsage(AudioAttributes.USAGE_ALARM)
                .build()


        val importance = NotificationManager.IMPORTANCE_DEFAULT

        val channelList = mNotificationManager.notificationChannels
        var i = 0
        while (channelList != null && i < channelList.size) {
            Log.d("channelList","channel ID is ${channelList[i].id}")
            mNotificationManager.deleteNotificationChannel(channelList[i].id)
            i++
        }

        Log.d("isnotification"," is it needed $isNotificationSoundNeeded importance is $importance")
        val mChannel = NotificationChannel(CHANNEL_ID, appName,  NotificationManager.IMPORTANCE_HIGH)
        mChannel.setShowBadge(false) …
Run Code Online (Sandbox Code Playgroud)

android android-notifications android-8.0-oreo

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

数组内部的数组android

我不知道该怎么做.但我想要的是创建一个两个数组..一个用于数组类,然后另一个用于我将用于使用for循环的所选类的信息.我更喜欢每个循环的循环.. ^ _ ^ ..我的问题是.创建一个可以存储数组的数组是否可行?例如:

private final Class<?>[] cls = {class1,class2,class3};
private final String[] myFirstArray = {array1[],array2[],array[]3};
private final String selectedarray[];

for(int i=0;i<cls.lenght();i++){
if(myArrayClassParameter == cls[i]){
selectedArray[] = myFirstArray[i];
}
}
Run Code Online (Sandbox Code Playgroud)

像那样?

好吧,如果它是可行的,我的工作将耗费更少的时间..谢谢.

java android

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

在数组java上存储字符串

我想知道是否可以在String数组上存储String变量?我不能很好地解释它,但这是我做的:

 String st1 = "",st2 = "",st3 = "",st4 = "";
 String[] str = {st1,st2,st3,st4};
Run Code Online (Sandbox Code Playgroud)

不幸的是,当我使用for循环时,str获取st1和st2以及st3和st4的值而不是它自己的变量..

这就是我想要完全按照我的想法做的事情.每当有一个String数组时,例如:

String[] containsValue = { "hi", "hello", "there" };

String strHi, strHello, strThere;
String[] getContainsValue = { strHi, strHello, strThere };

for (int x = 0; x < getContainsValue.length; x++) {
    getContainsValue[x] = containsValue[x];
}

The value of:
strHi = "hi"
strHello = "hello"
strThere = "there";
Run Code Online (Sandbox Code Playgroud)

基本上我想将containsValue []的值传递给3个String,它是存储在getContainsValue []中的strHi,strHello,strThere.然后使用for循环来对它们赋值来自containsValue [].这是真的吗?如果是这样,那么你可以给我一些格式怎么做?谢谢..

java android

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

在函数php中返回一个循环

是否可以返回循环?不是结果而是循环它自己.我想在php中创建一个函数.比如这样.

function myloop($sql){
$query = mysql_query($sql);

return while(mysql_fetch_assoc($query))
}
Run Code Online (Sandbox Code Playgroud)

我想创建它的原因是我避免重复代码.有人可以帮帮我吗?谢谢..

php

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

android没有清除sharedpreference

我想清除我放在第一个活动中的所有共享偏好,并在第二个活动中删除它。但是清除功能不起作用..这是我的代码

public class MyActivity extends Activity implements View.OnClickListener {
    /**
     * Called when the activity is first created.
     */

    public static final String PREFS_NAME = "ResumePrefs";

    SharedPreferences settings;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ((Button)findViewById(R.id.button)).setOnClickListener(this);

    }

    @Override
    protected void onResume() {
        try{
            Toast. makeText(this,settings.getString("answer_id",""),Toast.LENGTH_LONG).show();
        }catch (Exception e){
            Toast.makeText(this,e.toString(),Toast.LENGTH_LONG).show();
        }
        super.onResume();
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.button:
                 settings = getSharedPreferences(PREFS_NAME, 1);
                SharedPreferences.Editor editor = settings.edit();
                editor.putString("answer_id", "This is a test");
                editor.commit();
                     Intent intent = new …
Run Code Online (Sandbox Code Playgroud)

android android-preferences

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

运动物体中的碰撞检测LIBGDX

我设法在libgdx中使用box2d.但是,此处给出的示例代码仅适用于动态主体.我尝试使用它并且它工作得很好但是当我将Dynamic更改为KinematicBody时,代码不起作用.这是我的代码

    @Override
        public void create() {
      // Create our body definition
            BodyDef groundBodyDef =new BodyDef();
            groundBodyDef.type = BodyDef.BodyType.StaticBody;
    // Set its world position
            groundBodyDef.position.set(new Vector2(0, 10));

    // Create a body from the defintion and add it to the world
             groundBody = world.createBody(groundBodyDef);

    // Create a polygon shape
            PolygonShape groundBox = new PolygonShape();
    // Set the polygon shape as a box which is twice the size of our view port and 20 high
    // (setAsBox takes half-width and half-height …
Run Code Online (Sandbox Code Playgroud)

java collision-detection box2d libgdx

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

放入一些文本后,Html div调整大小

伙计..我希望我的html div在放一些文字后不要调整大小..正如你在上面的图片中看到的那样设置最小高度为250px; 但经过
多次LAYER 1 之后.可能20次,我期待div高度将是250像素,但它会自动调整大小?任何人都知道如何设置div的高度作为修复?即使添加文本也不会使div自动调整大小?谢谢..

在此输入图像描述

html css css3

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

运行时Libgdx intellij黑屏应用程序

我设法使用本教程http://code.google.com/p/libgdx/wiki/IntelliJIDEALibgdx在intellij idea 12中设置libgdx,但是当我运行桌面应用程序时,我不确定wthat是错的,它看起来像这样.在此输入图像描述

我期待libgdx的图像会像官方libgdx网站上的教程一样出现.对于教程的intelliJ部分,我将桌面链接到android的资产文件夹.正如您在下图中看到的那样,android模块的资产文件夹包含libgdx的图像.

在此输入图像描述

我按照教程中的备选方案2进行操作.

这是代码:

DesktopStarter类 - 桌面模块:

public class DesktopStarter {
    public static void main(String[] args) {
        LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
        cfg.title = "Title";
        cfg.useGL20 = true;
        cfg.width = 800;
        cfg.height = 480;
        new LwjglApplication(new MyLibgdxGame(), cfg);
    }
}
Run Code Online (Sandbox Code Playgroud)

MyLibgdxGameAndroidStarter类 - Android模块:

public class MyLibgdxGameAndroidStarter extends AndroidApplication
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
        cfg.useAccelerometer = false;
        cfg.useCompass = false;
        cfg.useWakelock = true;
        cfg.useGL20 = …
Run Code Online (Sandbox Code Playgroud)

java android intellij-idea libgdx

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

在日历上链接标记事件

这个 图片

我真的很想知道如何在日历中制作那些链接标记.大多数日历都只是标记不同颜色的事件.我想实现这种链接.知道我该怎么办?一直在寻找一些教程找不到任何.部分原因是我使用的关键字不同.我甚至不知道这个的正确用语.所以我称之为链接.任何人?

android

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

在多个数组上获取相同的元素值

我一直在搜索关于这个问题,大多数只有两个数组比较的问题有一个嵌套循环.我的问题非常相似,但规模更大.假设我的应用程序中有100或1000个用户,并且每个用户都有他想要的项目列表.像这样的东西

    User1 = {apple,orange,guava,melon,durian}
    User2 = {apple, melon,banana,lemon,mango}
    User3 = {orange,carrots,guava,melon,tomato}
    User4 = {mango,carrots,tomato,apple,durian}
    .
    .
   Nuser = ...
Run Code Online (Sandbox Code Playgroud)

我想看看所有用户数组中列出了多少苹果或橙子.所以我基本上比较但是规模更大.数据也不是静态的,用户可以从开发人员的知识中输入未知的水果,但是根据用户的知识,他们可以把它放在那里,这样可以有多个用户可以放置这个未知的水果,但系统仍然可以弄清楚这个未知项目被列出了多少.请记住,这是一个动态的.根据应用程序的受欢迎程度,用户可以达到例如100个用户.我不能在这里做嵌套循环.

PS这不是确切的问题,但它是我能想到解释我的问题的最简单的场景.

PS:只是为了澄清,我不打算像番石榴一样使用第三方库.我在proguard上遇到了问题.

java android java-7

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