Skip to content

Instantly share code, notes, and snippets.

View achinverma's full-sized avatar
🎯
Focusing

Achin verma achinverma

🎯
Focusing
  • India
View GitHub Profile
public class PolarChartActivity extends AppCompatActivity {
private ChartsPolar polar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chart_common);
AnyChartView anyChartView = findViewById(R.id.any_chart_view);
@achinverma
achinverma / android_shortcut.java
Created January 7, 2017 05:10 — forked from zakelfassi/android_shortcut.java
Create android app shortcut programatically
// Note that a shortcut is created automagically if the app is installed via Play store.
// Change "APP_NAME" by your app name. *MrObvious*
/*Manifest file - add this */
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
/* MainActivity.java */
public class MainActivity ... {
...
private SharedPreferences appSettings;
@achinverma
achinverma / SearchableAdapter.java
Created September 8, 2016 11:55 — forked from fjfish/SearchableAdapter.java
Simple String Adapter for Android ListView that has a filter that gives whatever it finds and ignores word boundaries
package com.yourco.yourapp;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
@achinverma
achinverma / NotificationExamplesMainActivity
Last active August 29, 2015 14:27 — forked from waynepiekarski/NotificationExamplesMainActivity
Example of using stack and page notifications with the Android Wear SDK
package testing.blog.waynepie.blogtesting;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.Intent;