Tag Archives: warning

605 views

Android Studio emulator errors warnings issue

– check errors, warnings in build.gradle and other files – Sync project – Clean project – Rebuild project – restart Android Studio – restart ADB – update Tools, libraries, etc. Speed Up Gradle Build In Android Studio -a android.intent.action.MAIN -c … Continue reading

Posted in Android Studio, Bugs, warnings, errors | Tagged , | Comments Off on Android Studio emulator errors warnings issue
3,398 views

View overrides onTouchEvent but not performClick

public class Panel extends SurfaceView implements SurfaceHolder.Callback { //…………… code //…………… some code /** * Process the MotionEvent. */ @Override public boolean onTouchEvent(MotionEvent event) {   synchronized (getHolder()) { if (event.getAction() == MotionEvent.ACTION_DOWN) { performClick(); } else if (event.getAction() == … Continue reading

Posted in Android Examples Code, Bugs, warnings, errors | Tagged , , , | Comments Off on View overrides onTouchEvent but not performClick
7,637 views

Do not hardcode /data/ use Context.getFilesDir().getPath()

// warning private static String DB_PATH = "/data/data/cz.okhelp.german_czech_phrases/databases/";   // OK public DataBaseHelper(Context context) { super(context, DB_NAME, null, 1); this.myContext = context; // OK DB_PATH = context.getFilesDir().getParentFile().getPath() + "/databases/"; }

Posted in Android Examples Code, Bugs, warnings, errors, SQLite database | Tagged , , | Comments Off on Do not hardcode /data/ use Context.getFilesDir().getPath()