Skip to content

DevAndroidMotionAndRelease#5

Open
AnnaKlimchuk wants to merge 7 commits intomasterfrom
DevAndroidMotionAndRelease
Open

DevAndroidMotionAndRelease#5
AnnaKlimchuk wants to merge 7 commits intomasterfrom
DevAndroidMotionAndRelease

Conversation

@AnnaKlimchuk
Copy link
Owner

No description provided.

Copy link
Collaborator

@IvanShafran IvanShafran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сложно проверять всё вместе, если честно.
По сервису бекапа: 7 баллов. +3, когда поправишь закрытие стрима правильно.
По touch: 5 баллов. +5, когда используешь CompatGestureDetector
По релизной сборке: 6 баллов + 4 балла, когда сделаешь, чтобы релизная сборка собиралась хитро. Один ключ использовался при отсутствии второго: https://github.com/IvanShafran/action-tracker/blob/master/app/action-tracker-signing.gradle
Проблема твоего варианта, что если скачать репозиторий, то нельзя релизную сборку запустить. Приватный ключ отдавать плохо, поэтому и нужен второй тестовый.

try {
fileOutputStream = openFileOutput(fileName, Context.MODE_PRIVATE);
fileOutputStream.write(databaseBackup.getBytes());
fileOutputStream.close();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Так неправильно закрывать stream. Используй try with resources лучше

}

@Override
public boolean onTouchEvent(MotionEvent event) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вместо рукописной обработки используй CompatGestureDetector


personId = -1;

if (findViewById(R.id.fragmentContainer2).getVisibility() == View.VISIBLE) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавь детектор только на экране(фрагменте) профиля человека, тогда достаточно вызвать onBackPressed у активити вместо этого кода

Copy link
Collaborator

@IvanShafran IvanShafran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

По сервису и release -- 10. По свайпу - 8. +2 за SimpleGestureListener

editText.setText(savedInstanceState.getString(ARG_DESCRIPTION));
}

gestureDetectorCompat = new GestureDetectorCompat(getContext(),this);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вместо того, чтобы имплеметировать все методы, можно подать в аргументы SimpleGestureListener и имплементировать только нужный метод onFling

personId,
updatedValues);
*/
/* ContentValues updatedValues = new ContentValues();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А почему код закоментирован? Если он не нужен, то надо удалить

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants