import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.view.Window;
+import com.owncloud.android.BuildConfig;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
getSupportActionBar().setHomeButtonEnabled(true); // mandatory since Android ICS, according to the official documentation
setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/); // always AFTER setContentView(...) ; to work around bug in its implementation
- showMessageView();
+ setBackgroundText();
Log_OC.d(TAG, "onCreate() end");
}
@Override
protected void onDestroy() {
+ Log_OC.d(TAG, "onDestroy() FileDisplyActivty");
+// Log_OC.stopLogging();
super.onDestroy();
}
}
@Override
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ if (BuildConfig.DEBUG) {
+ menu.findItem(R.id.action_logger).setVisible(true);
+ } else {
+ menu.findItem(R.id.action_logger).setVisible(false);
+ }
+ return super.onPrepareOptionsMenu(menu);
+ }
+
+ @Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getSherlock().getMenuInflater();
inflater.inflate(R.menu.main_menu, menu);
startActivity(settingsIntent);
break;
}
+ case R.id.action_logger: {
+ Intent loggerIntent = new Intent(getApplicationContext(),LogHistoryActivity.class);
+ startActivity(loggerIntent);
+ break;
+ }
case android.R.id.home: {
FileFragment second = getSecondFragment();
OCFile currentDir = getCurrentDir();
Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/);
- showMessageView();
+ setBackgroundText();
}
* Show a text message on screen view for notifying user if content is
* loading or folder is empty
*/
- private void showMessageView() {
+ private void setBackgroundText() {
OCFileListFragment ocFileListFragment = getListOfFilesFragment();
if (ocFileListFragment != null) {
int message = R.string.file_list_loading;
// In case file list is empty
message = R.string.file_list_empty;
}
- ocFileListFragment.setMessageforEmptyView(message);
+ ocFileListFragment.setMessageForEmptyList(getString(message));
} else {
Log.e(TAG, "OCFileListFragment is null");
}
setSupportProgressBarIndeterminateVisibility(true);
- showMessageView();
+ setBackgroundText();
}
/**
}
onTransferStateChanged(file, false, false);
}
-
+
}