use of tr.bcxip.hummingbird.managers.PrefManager in project Hummingbird-for-Android by xiprox.
the class ProfileFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
context = getActivity();
prefMan = new PrefManager(context);
/*
* Check if any username is passed to the fragment. If passed, load data for that user;
* if not, load for the currently logged in user.
*/
if (getArguments() != null) {
String receivedUsername = getArguments().getString(ARG_USERNAME);
if (receivedUsername != null && !receivedUsername.equals("") && !receivedUsername.trim().equals(""))
username = receivedUsername;
else
username = prefMan.getUsername();
} else
username = prefMan.getUsername();
}
Aggregations