应用程序,使应用程序屏幕慢 [英] App makes the apps screen slow

查看:172
本文介绍了应用程序,使应用程序屏幕慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个基本的应用程序中,用户可以查看自己的餐饮平衡,我设法通过解析正确的网页,要做到这一点。

I am making a basic app in which the users can check their "dinning balance", i managed to do this by parsing the proper web page.

我的应用程序工作得很好,但我发现,当我离开它,当前正在运行的应用程序界面(Android应用程序管理器)过得真慢,甚至laggy,正显示我的应用程序时。

My app works just fine, but i found that when i exit it, the Current Running Apps Screen (Android app manager) goes really slow, even laggy, when my app is being displayed.

我试着用下面的方法来杀我的应用程序,以便应用程序不会在后台运行,当我离开它,但它没有工作:

I tried to kill my app using the following methods so the app won't be running in background when i exit it, but it didnt work:

@Override
protected void onStop() {
    super.onStop();
    android.os.Process.killProcess(android.os.Process.myPid());
    System.exit(0);        
}

@Override
public void onBackPressed() {
    super.onBackPressed();
    finish();      
    System.exit(0);
}`

所以,现在,我试图找出为什么当前应用程序屏幕会更慢,由于我的应用程序。我的应用程序不会在后台执行任何操作,它只是处于闲置状态。新手在这里。

So right now, i am trying to figure out why does the "Current Apps" screen is going slower due to my app. My app is not executing anything in the background, its just idle. Newbie here.

推荐答案

这发生在我身上,前几天,我想我搞砸了我的资源文件夹和一个非常大的图标在我的RES /可绘制文件夹中结束了。

This happened to me a few days ago and I figured I messed up with my res folders and a very large icon ended up in my res/drawable folder.

请确保您的应用程序的图标是不是太大(图标建议的规格可以在这里找到:的 http://developer.android.com/design/style/iconography.html )。检查里面的所有的绘制文件夹(xxhdpi,xhdpi,华电国际...)[您的app文件夹] /应用/ src目录/主/ RES /绘制/

Make sure your app's icon isn't too large (recommended specifications for icons can be found here: http://developer.android.com/design/style/iconography.html). Check all drawable folders (xxhdpi, xhdpi, hdpi...) inside [Your app folder]/app/src/main/res/drawable/

希望我能帮上忙。
快乐编码:)

Hope I could help. Happy coding :)

这篇关于应用程序,使应用程序屏幕慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆