Optimization

This commit is contained in:
M66B 2024-06-15 08:19:38 +02:00
parent 36f1077dbd
commit 599685cf18
1 changed files with 4 additions and 2 deletions

View File

@ -158,8 +158,10 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
try { try {
view.setTranslationY(abh + offset); view.setTranslationY(abh + offset);
ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) view.getLayoutParams(); ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
mlp.bottomMargin = abh + offset; if (mlp.bottomMargin != abh + offset) {
view.setLayoutParams(mlp); mlp.bottomMargin = abh + offset;
view.setLayoutParams(mlp);
}
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex); Log.e(ex);
} }