-1

I am trying to create what I call an "application status bar" (probably not the correct term) that will display application state indications for the user ("connecting...", "loading...", etc.).

I have made several attempts on my own but I am not really a UI/UX programmer and everything I tried, including tween animations, just seems plain ugly :-)

Is there a library or a best practice to do something like that? I failed to find anything on Google.

Nom1fan
  • 846
  • 2
  • 11
  • 27
  • 2
    Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. – Prerak Sola Jan 22 '16 at 15:30
  • 1
    do you want it to be a persistent one or someting popping out now and then when the status changes?. For the latter you can use `SnackBar` – Viral Patel Jan 22 '16 at 15:43
  • @PrerakSola You're right. Usually I try to do it right but I guess I got lazy this time. Thanks for your comment. – Nom1fan Jan 22 '16 at 16:19

1 Answers1

1

Nom1fan, you can use the snackbar widget from the Google support design library. Here's an example use of it:

Snackbar.make(getView(), "connecting...", Snackbar.LENGTH_SHORT).show();

where getView() returns a view in your currently displayed layout

Bruno Carrier
  • 530
  • 5
  • 8
  • I didn't find that when searching, it sounds like what I'm looking for. Going to check it out now and if it's what I need I'll mark your answer as correct :) – Nom1fan Jan 22 '16 at 16:19
  • This is what I wanted but unfortunately I had to use a 3rd party snackbar. Trying to use Google Support design library was a nightmare for me. after updateding to API 23 (downloaded all needed packages from SDK manager), I tried using the snackbar and it seems it cannot work inside Activity? only ActivityCompat? I tried that too which made my whole UI very ugly and still did not work! Did anyone else experience such difficulties? – Nom1fan Jan 23 '16 at 07:56
  • 1
    Hi Nom1fan, I am not sure what is wrong with your use of AppCompatActivity. It is pretty standard to use AppCompatActivity instead of Activity. I suggest you get familiar with AppCompatActivity. – Bruno Carrier Jan 25 '16 at 07:11
  • For some reason when I changed to inherit from it, my UI (buttons, image buttons, and action bar) completely changed and looked much worse. Maybe I Need to familiar myself with the styles then. I will definitely give it another shot because of what you said. Thanks again! – Nom1fan Jan 25 '16 at 07:21
  • 1
    Yes, being familiar with styles will definitely help you. You're on the right path, so keep up with the hard work :) – Bruno Carrier Jan 26 '16 at 08:10