Android Open Source - qcn Desktop Activity






From Project

Back to project page qcn.

License

The source code is released under:

GNU General Public License

If you think the Android project qcn 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 zsoltmester.qcn.desktop;
//  ww  w .  j  a  v  a  2s.  com
import android.app.Activity;
import android.app.Fragment;
import android.graphics.BitmapFactory;
import android.os.Bundle;

import zsoltmester.qcn.R;

import static android.app.ActivityManager.TaskDescription;

public class DesktopActivity extends Activity {

  private Bundle savedInstanceState;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.savedInstanceState = savedInstanceState;
    initHomeScreen();
    initTaskDescription();
  }

  private void initHomeScreen() {
    setContentView(R.layout.activity_desktop);
    initHomeScreenFragment();
  }

  private void initHomeScreenFragment() {
    if (savedInstanceState != null) {
      // Already initialized.
      return;
    }

    getFragmentManager()
        .beginTransaction()
        .add(R.id.desktop_fragment_container, getHomeScreenFragment())
        .commit();
  }

  /**
   * Here you can set which is the current home screen fragment.
   *
   * @return The current home screen fragment.
   */
  private Fragment getHomeScreenFragment() {
    return new ContactFragment();
  }

  private void initTaskDescription() {
    TaskDescription taskDescriptionForTheDesktopApp = getTaskDescriptionForTheDesktopApp();
    setTaskDescription(taskDescriptionForTheDesktopApp);
  }

  /**
   * Here you can customise the task description for the desktop app.
   *
   * @return The customised task description.
   */
  private TaskDescription getTaskDescriptionForTheDesktopApp() {
    return new TaskDescription(
        getString(R.string.app_name),
        BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher),
        getResources().getColor(R.color.green_700));
  }
}




Java Source Code List

zsoltmester.qcn.desktop.ContactFragment.java
zsoltmester.qcn.desktop.DesktopActivity.java
zsoltmester.qcn.quickcircle.CoverEventReceiver.java
zsoltmester.qcn.quickcircle.QuickCircleBaseActivity.java
zsoltmester.qcn.quickcircle.notifications.NotificationActivity.java
zsoltmester.qcn.quickcircle.notifications.NotificationAdapter.java
zsoltmester.qcn.quickcircle.notifications.NotificationHelper.java
zsoltmester.qcn.quickcircle.notifications.NotificationListener.java
zsoltmester.qcn.tools.Logger.java
zsoltmester.qcn.ui.SimpleOnGestureListenerWithDoubleTapSupport.java