Add logos to exchange accounts list

This commit is contained in:
Tanguy Herbron 2018-08-29 01:11:25 +02:00
parent 2a4ba215e6
commit b97b8e7645
7 changed files with 99 additions and 11 deletions

View File

@ -13,6 +13,36 @@
<PersistentState>
<option name="children">
<map>
<entry key="actionbar">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="image">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="paddingPercent" value="-10" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
<option name="values">
<map>
<entry key="assetType" value="IMAGE" />
<entry key="imageAsset" value="D:\Projets Adobe\Photoshop\Moodl_background_textonly.png" />
<entry key="outputName" value="moodl_background" />
<entry key="theme" value="CUSTOM" />
<entry key="themeColor" value="ffffff" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="launcher">
<value>
<PersistentState>
@ -48,6 +78,11 @@
</entry>
</map>
</option>
<option name="values">
<map>
<entry key="outputIconType" value="ACTIONBAR" />
</map>
</option>
</PersistentState>
</value>
</entry>
@ -81,9 +116,10 @@
</option>
<option name="values">
<map>
<entry key="assetSourceType" value="FILE" />
<entry key="color" value="ffffff" />
<entry key="outputName" value="ic_arrow_upward_white_24dp" />
<entry key="sourceFile" value="C:\Users\Guitoune" />
<entry key="outputName" value="exchange_logo_hitbtc" />
<entry key="sourceFile" value="D:\Téléchargement\hitbtc.svg" />
</map>
</option>
</PersistentState>

View File

@ -306,8 +306,8 @@ public class Summary extends Fragment implements BalanceSwitchManagerInterface,
}
else
{
TextView appNameTextView = splashLayout.findViewById(R.id.appNameTextView);
appNameTextView.setVisibility(View.VISIBLE);
/*ImageView appNameImageView = splashLayout.findViewById(R.id.appNameImageView);
appNameImageView.setVisibility(View.VISIBLE);*/
animatedLayout.setVisibility(View.GONE);
}

View File

@ -18,6 +18,9 @@ import com.herbron.moodl.R;
import java.util.ArrayList;
import static com.herbron.moodl.DataManagers.DatabaseManager.BINANCE_TYPE;
import static com.herbron.moodl.DataManagers.DatabaseManager.HITBTC_TYPE;
public class ExchangeDescriptionListAdapter extends ArrayAdapter<Exchange> {
private Context context;
@ -42,10 +45,21 @@ public class ExchangeDescriptionListAdapter extends ArrayAdapter<Exchange> {
TextView exchangeNameTextView = convertView.findViewById(R.id.exchange_name);
TextView exchangeDescriptionTextView = convertView.findViewById(R.id.exchange_description);
ImageView accountOffImageView = convertView.findViewById(R.id.exchange_account_off_imageView);
ImageView exchangeImageView = convertView.findViewById(R.id.exchange_icon_imageView);
exchangeNameTextView.setText(exchange.getName());
exchangeDescriptionTextView.setText(exchange.getDescription());
switch (exchange.getType())
{
case BINANCE_TYPE:
exchangeImageView.setImageDrawable(context.getResources().getDrawable(R.drawable.exchange_logo_binance));
break;
case HITBTC_TYPE:
exchangeImageView.setImageDrawable(context.getResources().getDrawable(R.drawable.exchange_logo_hitbtc));
break;
}
if(!exchange.isEnabled())
{
accountOffImageView.setVisibility(View.VISIBLE);

View File

@ -0,0 +1,13 @@
<vector android:height="24dp" android:viewportHeight="2000"
android:viewportWidth="2000" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#f3ba2e"
android:pathData="M953,1986c-13,-7 -149,-139 -303,-294 -199,-201 -280,-289 -280,-304 0,-16 39,-61 120,-143l121,-121 194,195 195,196 195,-196 194,-195 127,127c69,69 124,133 122,140 -1,8 -139,148 -304,312 -321,317 -321,316 -381,283z" android:strokeColor="#00000000"/>
<path android:fillColor="#f3ba2e"
android:pathData="M117,1157c-51,-51 -98,-103 -105,-115 -14,-26 -16,-82 -2,-82 6,0 10,-5 10,-11 0,-15 185,-199 201,-199 18,0 254,232 254,250 0,18 -236,250 -254,250 -7,0 -54,-42 -104,-93z" android:strokeColor="#00000000"/>
<path android:fillColor="#f3ba2e"
android:pathData="M867,1132c-64,-64 -117,-124 -117,-132 0,-20 231,-250 250,-250 20,0 250,231 250,250 0,20 -231,250 -250,250 -9,0 -68,-53 -133,-118z" android:strokeColor="#00000000"/>
<path android:fillColor="#f3ba2e"
android:pathData="M1638,1125l-127,-125 125,-123c70,-67 132,-122 139,-122 8,0 56,41 107,92 157,154 157,151 0,306 -51,51 -98,93 -105,94 -7,2 -69,-53 -139,-122z" android:strokeColor="#00000000"/>
<path android:fillColor="#f3ba2e"
android:pathData="M490,755c-81,-82 -120,-127 -120,-143 0,-15 82,-105 283,-307 156,-157 289,-285 295,-285 7,0 12,-4 12,-10 0,-5 20,-10 45,-10 25,0 44,3 43,8 -1,4 131,137 293,297 161,160 295,296 297,304 2,7 -53,71 -122,140l-127,127 -194,-195 -195,-196 -195,196 -194,195 -121,-121z" android:strokeColor="#00000000"/>
</vector>

View File

@ -0,0 +1,23 @@
<vector android:height="24dp" android:viewportHeight="1950"
android:viewportWidth="1950" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#0072a0"
android:pathData="M656,1510l-208,-370 -224,-127c-124,-70 -223,-131 -221,-137 2,-5 160,-107 351,-226l348,-216 251,32c139,18 252,32 253,31 1,-1 13,-21 27,-43 21,-34 46,-52 131,-97 102,-54 107,-56 223,-66 192,-18 172,-9 270,-128 48,-58 89,-100 91,-93 2,6 -4,61 -13,121l-18,109 -151,87c-145,83 -154,91 -228,179l-78,93 95,157c52,87 93,159 91,161 -2,2 -98,-31 -189,-66l-28,-11 25,43 25,42 72,5 72,5 53,200c29,110 54,201 54,202 0,1 -21,5 -46,9l-46,7 36,20c20,12 36,23 36,26 -1,9 -271,176 -289,179 -10,1 -91,-77 -201,-192 -102,-107 -188,-192 -191,-188 -4,4 -35,126 -69,272 -81,348 -81,350 -89,350 -4,0 -101,-166 -215,-370z" android:strokeColor="#00000000"/>
<path android:fillColor="#008ebf"
android:pathData="M1231,1225c-101,-228 -187,-415 -191,-415 -4,0 -53,77 -110,171l-103,171 -191,-7 -191,-7 -223,-126c-122,-69 -221,-130 -219,-136 2,-5 160,-107 351,-226l348,-216 251,32c139,18 252,32 253,31 1,-1 13,-21 27,-43 21,-34 46,-52 131,-97 102,-54 107,-56 223,-66 192,-18 172,-9 270,-128 48,-58 89,-100 91,-93 2,6 -4,61 -13,121l-18,109 -151,87c-145,83 -154,91 -228,179l-78,93 95,157c52,87 93,159 91,161 -2,2 -16,-1 -32,-8 -16,-6 -64,-24 -107,-39l-77,-29 25,42 24,42 72,5 72,5 53,200c29,110 54,201 54,202 0,1 -24,5 -52,9 -58,8 -63,11 -193,157l-70,77 -184,-415z" android:strokeColor="#00000000"/>
<path android:fillColor="#57bbe6"
android:pathData="M1420,1263c0,-197 -4,-364 -8,-370 -4,-7 -83,-31 -175,-53l-167,-40 -225,0c-124,0 -225,3 -225,6 0,3 45,80 100,170 55,90 100,166 100,168 0,3 -33,3 -72,0 -40,-2 -127,-6 -193,-7l-120,-4 -218,-123c-119,-68 -216,-128 -214,-134 2,-5 160,-107 351,-226l348,-216 251,32c139,18 252,32 253,31 1,-1 13,-21 27,-43 21,-34 46,-52 131,-97 102,-54 107,-56 223,-66 192,-18 172,-9 270,-128 48,-58 89,-100 91,-93 2,6 -4,61 -13,121l-18,109 -151,87c-145,83 -154,91 -228,179l-78,93 95,157c52,87 93,159 91,161 -2,2 -98,-31 -189,-66l-28,-11 25,43 25,42 72,5 72,5 53,200c29,110 51,201 49,203 -1,2 -28,6 -58,9l-56,6 -91,103c-51,57 -94,104 -96,104 -2,0 -4,-161 -4,-357z" android:strokeColor="#00000000"/>
<path android:fillColor="#15a6db"
android:pathData="M1421,1270c0,-195 3,-350 5,-345 2,6 46,116 98,245l93,235 -48,55c-26,30 -70,80 -98,110l-50,55 0,-355z" android:strokeColor="#00000000"/>
<path android:fillColor="#15a6db"
android:pathData="M1625,1233c-49,-81 -103,-169 -119,-195l-28,-49 72,3 73,3 49,184c26,102 47,188 46,193 -2,4 -43,-58 -93,-139z" android:strokeColor="#00000000"/>
<path android:fillColor="#15a6db"
android:pathData="M779,1146c-2,-2 -78,-5 -169,-7 -174,-3 -171,-2 -265,-60 -16,-11 -41,-24 -55,-31 -14,-7 -28,-17 -32,-23 -4,-5 -8,-6 -8,-2 0,5 -12,-1 -26,-12 -15,-12 -31,-21 -36,-21 -5,0 -33,-15 -61,-34 -29,-18 -69,-41 -90,-51 -21,-10 -36,-19 -34,-21 4,-4 610,-85 612,-81 15,21 205,339 205,342 0,6 -35,7 -41,1z" android:strokeColor="#00000000"/>
<path android:fillColor="#15a6db"
android:pathData="M1524,937c-79,-30 -109,-46 -106,-56 3,-8 0,-11 -6,-7 -8,5 -309,-61 -359,-79 -8,-3 17,-54 68,-140 45,-75 80,-137 78,-139 -2,-2 -132,59 -288,135 -157,76 -287,137 -289,134 -3,-2 15,-82 39,-178l43,-173 250,32c189,25 253,30 259,21 4,-7 15,-25 23,-40 8,-16 19,-27 24,-25 4,2 49,54 98,116 68,85 92,108 96,95 3,-10 8,-89 12,-176 4,-86 10,-157 14,-157 16,0 217,-20 254,-25l40,-6 -20,23 -19,23 22,-19c12,-10 21,-21 20,-25 -1,-3 36,-53 83,-110 46,-57 86,-98 88,-91 3,7 -4,61 -13,121l-18,109 -147,85c-81,47 -151,85 -155,85 -4,0 -1,-8 6,-17 13,-16 12,-17 -4,-4 -9,7 -16,19 -15,25 2,6 -30,50 -70,98l-72,87 84,140c102,169 109,181 99,180 -4,0 -58,-19 -119,-42z" android:strokeColor="#00000000"/>
<path android:fillColor="#7bcff4"
android:pathData="M1625,1233c-49,-81 -103,-169 -119,-195l-28,-49 73,3 72,3 48,185c27,102 48,188 46,192 -1,4 -42,-58 -92,-139z" android:strokeColor="#00000000"/>
<path android:fillColor="#7bcff4"
android:pathData="M1528,938c-124,-46 -118,-34 -92,-182 8,-48 13,-90 11,-92 -2,-2 -91,25 -197,61 -107,36 -198,65 -202,65 -3,0 30,-61 74,-136 44,-74 79,-136 77,-138 -2,-2 -132,59 -288,135 -157,76 -287,137 -289,134 -3,-2 15,-82 39,-178l43,-173 216,28c118,15 232,30 252,33 36,5 39,3 58,-36 12,-22 25,-39 30,-37 4,2 49,54 98,116 68,85 92,108 96,95 3,-10 8,-89 12,-176 4,-86 10,-157 14,-157 18,0 229,-21 258,-26 27,-4 48,-24 119,-110 47,-57 88,-102 91,-100 10,10 -30,234 -42,230 -6,-2 -39,-8 -73,-12l-62,-9 -83,96c-46,53 -83,100 -83,106 0,6 -33,49 -73,97l-73,86 85,140c102,170 109,182 99,181 -4,0 -56,-19 -115,-41z" android:strokeColor="#00000000"/>
<path android:fillColor="#8cdbff"
android:pathData="M1531,939c-58,-21 -107,-41 -109,-44 -3,-2 3,-57 13,-121 14,-93 20,-113 30,-102 9,10 156,252 182,301 7,11 -6,8 -116,-34z" android:strokeColor="#00000000"/>
</vector>

View File

@ -62,7 +62,7 @@
android:id="@+id/exchange_icon_imageView"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginEnd="@dimen/margin"/>
android:layout_margin="5dp"/>
<LinearLayout
android:layout_width="match_parent"
@ -71,7 +71,8 @@
android:layout_toEndOf="@id/exchange_icon_imageView"
android:layout_toStartOf="@id/exchange_account_off_imageView"
android:gravity="center_vertical"
android:foregroundGravity="center_vertical">
android:foregroundGravity="center_vertical"
android:layout_marginTop="5dp">
<TextView
android:id="@+id/exchange_name"

View File

@ -2,15 +2,16 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="@color/colorPrimaryDark">
android:background="@color/colorPrimaryDark"
android:orientation="vertical">
<TextView
android:id="@+id/appNameTextView"
android:text="@string/app_name"
<ImageView
android:id="@+id/appNameImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:visibility="gone"
android:layout_gravity="center"/>
android:src="@mipmap/ic_launcher_moodl"/>
<LinearLayout
android:id="@+id/animatedViewsLayout"