Kaopiz/KProgressHUD

How can show it without spinner?

Closed this issue · 2 comments

Hello

I just want to show it with spinner, but when I will got success or error I want to switch it to simple toast. Is it possible? I tried to do that

View v = new View(LoginActivity.this);
v.setLayoutParams(new LinearLayout.LayoutParams(1, 1));
v.setBackgroundColor(Color.TRANSPARENT);
hud.setCustomView(v);
hud.setDetailsLabel("Something went wrong");

But it doesn't work as expected...
Please help.

Ok, I found the solution

TextView label = new TextView(LoginActivity.this);
label.setText("Something went wrong");
label.setTextColor(Color.WHITE);
hud.setCustomView(label);

But I don't like the animation when I set the custom view... can I change it somehow?

Just fixed it by dismissing hud with spinner and creating the new one with a custom view.