~tomdroid-maintainers/tomdroid/note-editing-and-syncing

« back to all changes in this revision

Viewing changes to src/org/tomdroid/ui/Tomdroid.java

  • Committer: Stefan Hammer
  • Date: 2013-03-18 21:27:54 UTC
  • Revision ID: j.4@gmx.at-20130318212754-fbwsa5t5l5su65zh
fix lp:1149319 now there is a return arrow left from the actionbar home icon if it is enabled and it is disabled in the home activity and others.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
import org.tomdroid.sync.SyncManager;
36
36
import org.tomdroid.sync.SyncService;
37
37
import org.tomdroid.util.ErrorList;
 
38
import org.tomdroid.ui.actionbar.ActionBarHelperBase;
38
39
import org.tomdroid.ui.actionbar.ActionBarListActivity;
39
40
import org.tomdroid.util.FirstNote;
40
41
import org.tomdroid.util.Honeycomb;
49
50
import org.tomdroid.util.TLog;
50
51
import org.tomdroid.xml.LinkInternalSpan;
51
52
 
 
53
import android.annotation.SuppressLint;
52
54
import android.annotation.TargetApi;
 
55
import android.app.ActionBar;
53
56
import android.app.Activity;
54
57
import android.app.AlertDialog;
55
58
import android.app.Dialog;
174
177
        private String query;
175
178
        
176
179
        /** Called when the activity is created. */
 
180
        @SuppressLint("NewApi")
177
181
        @Override
178
182
        public void onCreate(Bundle savedInstanceState) {
179
183
                super.onCreate(savedInstanceState);
218
222
                }
219
223
                
220
224
                this.intent = getIntent();
221
 
 
 
225
                
222
226
            if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
223
227
                this.setTitle(getString(R.string.app_name) + " - " + getString(R.string.SearchResultTitle));
224
228
                query = intent.getStringExtra(SearchManager.QUERY);
227
231
                SearchRecentSuggestions suggestions = new SearchRecentSuggestions(this,
228
232
                        SearchSuggestionProvider.AUTHORITY, SearchSuggestionProvider.MODE);
229
233
                suggestions.saveRecentQuery(query, null);
 
234
                } else {
 
235
                        // if main view -> disable the tomdroid icon home button
 
236
                        setHomeButtonEnabled(false);
230
237
                }
231
238
            
232
239
                String defaultSortOrder = Preferences.getString(Preferences.Key.SORT_ORDER);