Android Open Source - Android-Todo-Application Main Activity






From Project

Back to project page Android-Todo-Application.

License

The source code is released under:

MIT License

If you think the Android project Android-Todo-Application listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.samvandenberge.todo;
/*www  .  ja  v a2  s . c  o m*/
import android.app.Activity;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.view.WindowManager;

import com.readystatesoftware.systembartint.SystemBarTintManager;
import com.samvandenberge.todo.R;

public class MainActivity extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // don't pop up keyboard automatically
    getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

    // statusBar tint
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
      SystemBarTintManager tintManager = new SystemBarTintManager(this);
      tintManager.setStatusBarTintEnabled(true);
      int actionBarColor = Color.parseColor("#5d98db");
      tintManager.setStatusBarTintColor(actionBarColor);
    }

    if (savedInstanceState == null) {
      getFragmentManager().beginTransaction().add(R.id.container, new OverviewFragment()).commit();
    }
  }

  public boolean performAction(int itemId, int position) {
    return (false);
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
  }
}




Java Source Code List

com.samvandenberge.todo.AboutActivity.java
com.samvandenberge.todo.MainActivity.java
com.samvandenberge.todo.OverviewFragment.java
com.samvandenberge.todo.TodoListAdapter.java
com.samvandenberge.todo.extension.TodoExtension.java
com.samvandenberge.todo.extension.TodoSettingsActivity.java
com.samvandenberge.todo.model.Todo.java
com.samvandenberge.todo.sqlite.DatabaseTodo.java
com.samvandenberge.todo.util.Helper.java