Skip to content

Instantly share code, notes, and snippets.

View cyc115's full-sized avatar

Mike Chen cyc115

  • Chicago, IL
  • 20:48 (UTC -12:00)
View GitHub Profile
@cyc115
cyc115 / async.java
Created May 22, 2014 15:48
async task in android
/**
* The three types used by an asynchronous task are the following:
Params, the type of the parameters sent to the task upon execution.
Progress, the type of the progress units published during the background computation.
Result, the type of the result of the background computation.
Not all types are always used by an asynchronous task. To mark a type as unused, simply use the type Void:
private class MyTask extends AsyncTask<Void, Void, Void> { ... }
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.content.browser;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@cyc115
cyc115 / simple card view.java
Created May 16, 2014 15:01
simple card view
/**
* import com.google.android.glass.app.Card;
* extends Activity
*
**/
/**
* simple card view example
*/
protected void onCreate(Bundle savedInstanceState){