import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
import android.annotation.TargetApi;
-import android.app.AlertDialog;
+import android.support.v7.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
setFile(file);
if (mAccountWasSet) {
- RelativeLayout navigationDrawerLayout = (RelativeLayout) findViewById(R.id.left_drawer);
- if (navigationDrawerLayout != null && getAccount() != null) {
- TextView username = (TextView) navigationDrawerLayout.findViewById(R.id.drawer_username);
- int lastAtPos = getAccount().name.lastIndexOf("@");
- username.setText(getAccount().name.substring(0, lastAtPos));
- }
+ setUsernameInDrawer((RelativeLayout) findViewById(R.id.left_drawer), getAccount());
}
if (!stateWasRecovered) {
}
}
-
private void createMinFragments() {
OCFileListFragment listOfFiles = new OCFileListFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();