Created
February 13, 2018 15:09
-
-
Save dario61081/2fb2a8966048437db6b121012db5bf1e to your computer and use it in GitHub Desktop.
metodos para utilizar el actionbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void setActionBarUser(android.support.v7.app.ActionBar actionBar, String user){ | |
try { | |
actionBar.setSubtitle(String.format(Locale.US, "Usuario: %s", user)); | |
}catch (Exception e){ | |
actionBar.setSubtitle(""); | |
e.printStackTrace(); | |
} | |
} | |
public static void setActionBarMessage(android.support.v7.app.ActionBar actionBar, String message) { | |
try{ | |
actionBar.setSubtitle(message); | |
}catch (Exception e){ | |
actionBar.setSubtitle(""); | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment