App加速和停止延迟

时间:2018-05-04 08:57:36

标签: javascript android performance android-studio cpu-speed

我的名字是Moncef,我想知道我怎么能加快我的应用程序,因为当我在手机上试用它时,我试图删除未使用的代码和图像以及类似的东西,但它仍然落后。 该应用程序只是一个日历应用程序



package com.moncef.calendar;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.widget.CalendarView;
import android.widget.TextView;

public class CalendarActivity extends AppCompatActivity {

    private TextView textView;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_calendar);

            CalendarView calendarView = findViewById(R.id.calendarView);
        textView = findViewById(R.id.textView);

        calendarView.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {
        @Override
        public void onSelectedDayChange(@NonNull CalendarView calendarView, int i, int i1, int i2){
            String date = (i1 + 1) + "/" + i2 + "/" + i;
            textView.setText(date);
        }
     });
     }

   }

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.moncef.calendar"
    android:installLocation="auto">

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <application
        android:minSdkVersion="23"
        android:targetSdkVersion="27"
        android:launchMode="standard"
        android:hardwareAccelerated="true"
        android:allowBackup="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:roundIcon="@drawable/roundicon"
        android:supportsRtl="true"
        android:isGame="false"
        android:fullBackupContent="@xml/backup_descriptor">
        <activity android:name=".CalendarActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
&#13;
&#13;
&#13;

谢谢。

0 个答案:

没有答案