mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-19 01:27:18 -04:00
Merge pull request #711 from serpentspirale/v3_openjdk
Added click animation when selecting a profile in PojavLoginActivity
This commit is contained in:
commit
c5f6552e78
@ -11,6 +11,7 @@ import android.graphics.Bitmap;
|
|||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Matrix;
|
import android.graphics.Matrix;
|
||||||
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
@ -720,7 +721,6 @@ public class PojavLoginActivity extends BaseActivity
|
|||||||
for (int accountIndex = 0; accountIndex < accountArr.length; accountIndex++) {
|
for (int accountIndex = 0; accountIndex < accountArr.length; accountIndex++) {
|
||||||
String s = accountArr[accountIndex];
|
String s = accountArr[accountIndex];
|
||||||
View child = inflater.inflate(R.layout.simple_account_list_item, null);
|
View child = inflater.inflate(R.layout.simple_account_list_item, null);
|
||||||
ImageView accountIcon = child.findViewById(R.id.accountitem_image_icon);
|
|
||||||
TextView accountName = child.findViewById(R.id.accountitem_text_name);
|
TextView accountName = child.findViewById(R.id.accountitem_text_name);
|
||||||
ImageButton removeButton = child.findViewById(R.id.accountitem_button_remove);
|
ImageButton removeButton = child.findViewById(R.id.accountitem_button_remove);
|
||||||
|
|
||||||
@ -738,8 +738,9 @@ public class PojavLoginActivity extends BaseActivity
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Bitmap upscaledBitmap = Bitmap.createScaledBitmap(bitmap, 80, 80, false);
|
accountName.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(getResources(),
|
||||||
accountIcon.setImageBitmap(upscaledBitmap);
|
Bitmap.createScaledBitmap(bitmap, 80, 80, false)),
|
||||||
|
null, null, null);
|
||||||
|
|
||||||
accountName.setText(accNameStr);
|
accountName.setText(accNameStr);
|
||||||
|
|
||||||
|
@ -6,32 +6,22 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/accountitem_image_icon"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/accountitem_text_name"
|
android:id="@+id/accountitem_text_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
|
||||||
|
|
||||||
android:text="Name Placeholder"
|
android:text="Name Placeholder"
|
||||||
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||||
app:layout_constraintLeft_toRightOf="@id/accountitem_image_icon"
|
android:drawablePadding="20dp"
|
||||||
app:layout_constraintRight_toLeftOf="@id/accountitem_button_remove"
|
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/accountitem_button_remove"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
@ -42,7 +32,7 @@
|
|||||||
android:paddingStart="10dp"
|
android:paddingStart="10dp"
|
||||||
|
|
||||||
android:paddingEnd="10dp"
|
android:paddingEnd="10dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="@+id/accountitem_text_name"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/ic_remove" />
|
app:srcCompat="@drawable/ic_remove" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user