Fix AddExchangeActivity crash for 19-23 SDK

- Update the exchange connexion error icon
This commit is contained in:
Tanguy Herbron 2018-08-04 03:54:45 +02:00
parent ae3ab48c58
commit 1d18847c3c
8 changed files with 14 additions and 12 deletions

View File

@ -23,7 +23,7 @@
<PersistentState>
<option name="values">
<map>
<entry key="url" value="jar:file:/C:/Program%20Files/Android/Android%20Studio/plugins/android/lib/android.jar!/images/material_design_icons/editor/ic_money_off_black_24dp.xml" />
<entry key="url" value="jar:file:/C:/Program%20Files/Android/Android%20Studio/plugins/android/lib/android.jar!/images/material_design_icons/alert/ic_error_black_24dp.xml" />
</map>
</option>
</PersistentState>
@ -34,7 +34,7 @@
<option name="values">
<map>
<entry key="color" value="ffffff" />
<entry key="outputName" value="ic_money_off_24dp" />
<entry key="outputName" value="ic_error_24dp" />
<entry key="sourceFile" value="C:\Users\Guitoune" />
</map>
</option>

View File

@ -34,8 +34,8 @@ public class AddExchangeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_exchange);
getApplicationContext().setTheme(R.style.InputActivityTheme);
setContentView(R.layout.activity_add_exchange);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
@ -85,12 +85,12 @@ public class AddExchangeActivity extends AppCompatActivity {
switch (exchangeType)
{
case DatabaseManager.BINANCE_TYPE:
setupExchangeLayout = (LinearLayout) LayoutInflater.from(getApplicationContext()).inflate(R.layout.binance_exchange_setup_layout, setupExchangeLayout, true);
setupExchangeLayout = (LinearLayout) LayoutInflater.from(getBaseContext()).inflate(R.layout.binance_exchange_setup_layout, setupExchangeLayout, true);
bindSetupViews();
break;
case DatabaseManager.HITBTC_TYPE:
setupExchangeLayout = (LinearLayout) LayoutInflater.from(getApplicationContext()).inflate(R.layout.hitbtc_exchange_setup_layout, setupExchangeLayout, true);
setupExchangeLayout = (LinearLayout) LayoutInflater.from(getBaseContext()).inflate(R.layout.hitbtc_exchange_setup_layout, setupExchangeLayout, true);
bindSetupViews();
break;

View File

@ -57,6 +57,7 @@ public class ExchangeDescriptionListAdapter extends ArrayAdapter<Exchange> {
Intent editExchangeAccountIntent = new Intent(context, AddExchangeActivity.class);
editExchangeAccountIntent.putExtra("isEdit", true);
editExchangeAccountIntent.putExtra("exchangeId", exchange.getId());
editExchangeAccountIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(editExchangeAccountIntent);
}
});

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="@color/error"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z"/>
</vector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M12.5,6.9c1.78,0 2.44,0.85 2.5,2.1h2.21c-0.07,-1.72 -1.12,-3.3 -3.21,-3.81V3h-3v2.16c-0.53,0.12 -1.03,0.3 -1.48,0.54l1.47,1.47c0.41,-0.17 0.91,-0.27 1.51,-0.27zM5.33,4.06L4.06,5.33 7.5,8.77c0,2.08 1.56,3.21 3.91,3.91l3.51,3.51c-0.34,0.48 -1.05,0.91 -2.42,0.91 -2.06,0 -2.87,-0.92 -2.98,-2.1h-2.2c0.12,2.19 1.76,3.42 3.68,3.83V21h3v-2.15c0.96,-0.18 1.82,-0.55 2.45,-1.12l2.22,2.22 1.27,-1.27L5.33,4.06z"/>
</vector>

View File

@ -92,7 +92,7 @@
android:id="@+id/exchange_account_off_imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_money_off_24dp"
android:src="@drawable/ic_error_24dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:visibility="gone"/>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@ -44,5 +44,7 @@
<color name="softWhite">#66FFFFFF</color>
<color name="hardWhite">#88FFFFFF</color>
<color name="error">#FFB00020</color>
<color name="binance">#FFF5BC00</color>
</resources>