no more animation because of OOMs (#105)

This commit is contained in:
m2049r 2017-11-01 10:56:47 +01:00 committed by GitHub
parent 03c5569f91
commit 62b77fc987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 51 additions and 151 deletions

View File

@ -18,9 +18,7 @@ package com.m2049r.xmrwallet;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.FloatingActionButton;
@ -66,7 +64,6 @@ public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInter
List<WalletManager.WalletInfo> walletList = new ArrayList<>();
List<WalletManager.WalletInfo> displayedList = new ArrayList<>();
ImageView ivGuntherWallets;
EditText etDummy;
DropDownEditText etDaemonAddress;
ArrayAdapter<String> nodeAdapter;
@ -134,8 +131,6 @@ public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInter
Log.d(TAG, "onCreateView");
View view = inflater.inflate(R.layout.fragment_login, container, false);
ivGuntherWallets = (ImageView) view.findViewById(R.id.ivGuntherWallets);
fabScreen = (FrameLayout) view.findViewById(R.id.fabScreen);
fab = (FloatingActionButton) view.findViewById(R.id.fab);
fabNew = (FloatingActionButton) view.findViewById(R.id.fabNew);
@ -216,22 +211,6 @@ public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInter
return view;
}
void showGunther() {
ivGuntherWallets.setImageResource(R.drawable.gunther_wallets);
final AnimationDrawable guntherWalletsAnim = (AnimationDrawable) ivGuntherWallets.getDrawable();
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
guntherWalletsAnim.start();
}
}, getResources().getInteger(R.integer.gunther_wallets_delay));
}
void normalGunther() {
ivGuntherWallets.setImageResource(R.drawable.gunther_wallets_00);
}
// Callbacks from WalletInfoAdapter
@Override
public void onInteraction(final View view, final WalletManager.WalletInfo infoItem) {
@ -288,11 +267,6 @@ public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInter
filterList();
adapter.setInfos(displayedList);
adapter.notifyDataSetChanged();
if (displayedList.isEmpty()) {
showGunther();
} else {
normalGunther();
}
}
private void showInfo(@NonNull String name) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true">
<item
android:drawable="@drawable/gunther_wallets_00"
android:duration="500" />
<item
android:drawable="@drawable/gunther_wallets_01"
android:duration="200" />
<item
android:drawable="@drawable/gunther_wallets_02"
android:duration="2000" />
<item
android:drawable="@drawable/gunther_wallets_03"
android:duration="1000" />
<item
android:drawable="@drawable/gunther_wallets_04"
android:duration="100" />
<item
android:drawable="@drawable/gunther_wallets_05"
android:duration="1000" />
<item
android:drawable="@drawable/gunther_wallets_06"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_07"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_08"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_09"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_10"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_11"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_12"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_13"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_14"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_15"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_16"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_17"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_18"
android:duration="5000" />
<item
android:drawable="@drawable/gunther_wallets_19"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_20"
android:duration="0" />
<item
android:drawable="@drawable/gunther_wallets_21"
android:duration="100" />
<item
android:drawable="@drawable/gunther_wallets_22"
android:duration="200" />
</animation-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1,71 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8sp">
android:layout_margin="8sp"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<EditText
android:id="@+id/etDummy"
android:layout_width="0dp"
android:layout_height="0dp" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:hint="@string/label_daemon">
<EditText
android:id="@+id/etDummy"
android:layout_width="0dp"
android:layout_height="0dp" />
<android.support.design.widget.TextInputLayout
<com.m2049r.xmrwallet.layout.DropDownEditText
android:id="@+id/etDaemonAddress"
style="@style/MoneroEdit.Small"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:hint="@string/label_daemon">
android:gravity="start"
android:hint="@string/prompt_daemon"
android:imeOptions="actionDone"
android:inputType="textWebEmailAddress|textNoSuggestions"
android:maxLines="1"
android:textIsSelectable="true" />
</android.support.design.widget.TextInputLayout>
<com.m2049r.xmrwallet.layout.DropDownEditText
android:id="@+id/etDaemonAddress"
style="@style/MoneroEdit.Small"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start"
android:hint="@string/prompt_daemon"
android:imeOptions="actionDone"
android:inputType="textWebEmailAddress|textNoSuggestions"
android:maxLines="1"
android:textIsSelectable="true" />
</android.support.design.widget.TextInputLayout>
<TextView
style="@style/MoneroLabel.Heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="8sp"
android:text="@string/label_login_wallets" />
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
style="@style/MoneroLabel.Heading"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="8sp"
android:text="@string/label_login_wallets" />
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fillViewport="true">
<ImageView
android:id="@+id/ivGuntherWallets"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/gunther_wallets_00" />
<android.support.v7.widget.RecyclerView xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="72dp"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_wallet" />
</FrameLayout>
</LinearLayout>
android:adjustViewBounds="true"
android:padding="48dp"
android:src="@drawable/gunther_desaturated" />
</ScrollView>
<include layout="@layout/layout_fabmenu" />
<android.support.v7.widget.RecyclerView xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="72dp"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_wallet" />
</FrameLayout>
<include layout="@layout/layout_fabmenu" />
</FrameLayout>
</LinearLayout>