radio buttons style to match the theme. error toast on failure

This commit is contained in:
M M Arif 2019-10-25 23:19:16 +05:00
parent c4b0b596d3
commit 7e3eef90d2
3 changed files with 10 additions and 0 deletions

View File

@ -507,6 +507,9 @@ public class LoginActivity extends AppCompatActivity implements View.OnClickList
@Override @Override
public void onFailure(@NonNull Call<UserInfo> call, @NonNull Throwable t) { public void onFailure(@NonNull Call<UserInfo> call, @NonNull Throwable t) {
Log.e("onFailure", t.toString()); Log.e("onFailure", t.toString());
Toasty.info(getApplicationContext(), getResources().getString(R.string.genericError));
enableProcessButton();
loginButton.setText(R.string.btnLogin);
} }
}); });

View File

@ -47,12 +47,14 @@
android:text="@string/loginViaPassword" android:text="@string/loginViaPassword"
android:checked="true" android:checked="true"
android:layout_marginEnd="30dp" android:layout_marginEnd="30dp"
android:theme="@style/radioButtonsInDarkTheme"
android:textColor="@color/white"/> android:textColor="@color/white"/>
<RadioButton <RadioButton
android:id="@+id/loginToken" android:id="@+id/loginToken"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/copyToken" android:text="@string/copyToken"
android:theme="@style/radioButtonsInDarkTheme"
android:textColor="@color/white"/> android:textColor="@color/white"/>
</RadioGroup> </RadioGroup>

View File

@ -56,4 +56,9 @@
<item name="android:layout_marginBottom">10dp</item> <item name="android:layout_marginBottom">10dp</item>
</style> </style>
<style name="radioButtonsInDarkTheme" parent="Theme.AppCompat.Dialog.Alert">
<item name="colorControlNormal">@color/white</item>
<item name="colorControlActivated">@color/white</item>
</style>
</resources> </resources>