Quick Start Guide

Create a Basic Grid

Start by creating a new Android Application project:

  1. From the Welcome screen click New Project (if you have a project already open click File > New > New Project…)
  2. Give the application an Application name: shinobi-grids-android-quickstart and a suitable Package name (we use com.shinobicontrols.grids.sample.quickstart but you should use your own)
  3. Choose a suitable location for the project and click Next
  4. Click Next again to choose the default form factor (Phone and Tablet) and Minimum SDK (shinobigrids supports Android API 14 and above so you can use the default value of API 14)
  5. Click Blank Activity and click Next
  6. Choose an appropriate name for your activity - this guide will assume the main activity is named QuickStartActivity
  7. Click Finish and your project will be created

Now that you have your new project set up follow the Android Studio import instructions to add a dependency to the shinobigrids library from your application. If you are using Eclipse then you can follow the Eclipse import instructions.

Add the ShinobiGridView

In the activity_quick_start.xml file of your application, which can be found in the res/layout folder, replace the TextView element with a ShinobiGridView:

    android:layout_height="match_parent" />

In QuickStartActivity.java we are going to obtain a reference to our ShinobiGridView. In the onCreate method add the following code:

ShinobiGridView shinobiGridView = (ShinobiGridView) findViewById(R.id.my_grid);

You will need to import the ShinobiGridView class.

Tip: In Android Studio use Alt+Enter to perform a quick fix such as importing a class

If you are working with the trial library you will have been given a trial key. You’ll need to set this key on the ShinobiGridView as follows:


Make sure you change <trial_key_here> to the trial key you were given!

Note: If you have purchased a licensed version of the library you will not need to set a trial key. If you have purchased a license, please ensure you are referencing the licensed, rather than the trial version of the library within your project.

<< Previous: Quick start introduction | Next: Create some data >>