Code Monkey home page Code Monkey logo

android_guides's Introduction

CodePath Android Cliffnotes

Welcome to the open-source Codepath Android Cliffnotes! Our goal is to become the central crowdsourced resource for complete and up-to-date Android content and tutorials. Just take me to the notes!

CodePath

We have guides for everyone whether you are beginner, intermediate or advanced. Want to learn how to use the ActionBar or the ins and outs of fragments? We got that. Want to learn about testing or how to build flexible user interfaces for multiple devices? We got you covered. We don't waste time with the "theoretical approach" from a book. We cover exactly the things we use every day as we are developing apps for contracts.

Need Help? Please join the google groups for these guides where you can post related questions.

Motivation

Ever been frustrated finding information on outdated one-off blog posts and tutorials that has since become irrelevant? How many times have you been googling only to find your answer on a 2 year old Stack Overflow post? We believe there's got to be a better way. Why not have a community to work together in creating useful and detailed documentation for every aspect of Android development(or any platform)?

Read about our mission to change the way engineers learn new technologies and we would love for you to get involved! In addition, we are a fledgling startup so if you like this guide and what we are trying to do, please consider following us on twitter @codepath!

Live in San Francisco?

Located in the San Francisco Bay Area and interested in learning with others in a more structured program? Check out our local Android or iOS meetup events. We have free evening events and at-cost 1-day workshops to make learning social and connect you with others passionate about mobile.

If you are an experienced engineer (2+ years of professional experience in software development) and serious about learning Android, check out our free evening 8-week Android bootcamp. Learn how to build mobile apps while collaborating with other engineers and designers. Work on solving important problems for non-profits with our free 8-week accelerated evening mobile boot camp. Learn more and apply here.

We Need Your Help!

We need your help making the guides even better. In particular, here are the easiest ways to contribute:

  1. Update Guides. Review existing guides and update outdated content, add tips or add/update images
  2. Fill Out Guides. Find guides that are simply stubs and fill them out with content.
  3. Create New Guides. Review the missing topics list and create new topic guides.

We maintain a master missing topics list that contains the most important missing topics. Also, look for items in the cliff notes with the Needs Attention mark which indicates the guide needs some love. If you see a topic you'd like added, please check the issues for this repository to let us know.

If you are interested in contributing to our guides, please check out our contribution guidelines first.

Contributors

These guides were originally created and adapted by Nathan Esquenazi as a part of our CodePath training and bootcamps. We have also had contributions from many community members including:

android_guides's People

Contributors

abhishek-amrute avatar cpzackparker avatar eltociear avatar flekken avatar h3rsko avatar jc4p avatar kgleong avatar nesquena avatar rogerhu avatar sammug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android_guides's Issues

Organizing-your-Source-Files suggests plurals

I realise this is very much a matter of taste, but it may be worth noting on the Organizing-your-Source-Files page that the Android API favours singular names for things, not plurals.

E.g., it's android.widget, not android.widgets.

So it may make more sense to follow that convention, especially if you plan on writing anything that would naturally be named similarly. For example, you chould put any custom widgets you've written in to com.example.myapp.widget.SomeWidget, not com.example.myapp.widgets.SomeWidget.

Suggestion - Importing libraries

It would be nice to have a section which explains how to add existing libraries in Android Studio and probably Eclipse too. I recently had a lot of trouble using Android Studio and couldn't find clear explanations on the subject. I finally got it working after a few tries.

Update Genymotion Tutorial with Changes

I figured that since there were some extensive changes to Genymotion due to the google crackdown that we should update the Genymotion setup for google mapv2 and in general. At the moment, I would argue Genymotion is unstable for development of apps that require google play services. I've found adding in the google play services using the provided zip to new virtual devices can cause a lot of issues.

Rotten Tomatoes Networking Tutorial Isnt working

Followed this tutorial verbatim. Got upto the part where it should populate ListView before it breaks into the detailed section, it is not currently doing anything. I think there is something wrong with the logic of this Fetch of Data. The tutorial never points out where to call fetchBoxOfficeMovies(); it just sorta has the user guess. Plus you shouldn't give a list adapter a empty arraylist, then call fetchBoxOfficeMovies(); and add the results to the array adapter like it says with adapterMovies.add(movie); .. Instead you should fetch the results and store the results in the arraylist onSuccess, then pass that arraylist into the array adapter. The events need to be chained. let me know if you need a copy of my code to see why it isnt working.

Homepage navigation pane disappears

Not sure if this is the desired behavior, but whenever I click on one of the items in the navigation pane to jump to a category, the pane disappears until the animation to get to the category is complete.

Suggestion - SugarORM

A quick guide for people wanting an alternative to ActiveAndroid, which is currently the only cliffnoted third party ORM, would be swell.

GetArguments () returns null after it was created in the constructor

debugging point by point I realized that GetArguments () returns null in onCreate in the constructor of my fragment I get good parameters, but in the OnCreate returns null

Fragment fragment = new Fragment();
    Bundle args = new Bundle();

    switch (position) {
        case 0:
            fragment = new Fragment_1(); // Fragment 1
            args.putInt(Fragment_1.ARG_FRAGMENT_1, position + 1);
            fragment.setArguments(args);
            Fragment_1.newInstance(descripcion_local);


            break;

from a shipping case and I receive data either in the constructor

public class Fragment_1 extends Fragment {
    public static final String ARG_FRAGMENT_1 = "section_number_1";
    TextView textView;
    private String descip;

    public static  Fragment_1 newInstance(String descripcion) {
        Fragment_1 fragmentFirst = new Fragment_1();
        Bundle args = new Bundle();
        args.putString("descripcion", descripcion);

        fragmentFirst.setArguments(args);
        return fragmentFirst;


    }
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        descip = getArguments().getString("descripcion");

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View rootView = inflater.inflate(R.layout.v_tab_desc, container,  false);

        textView = (TextView) rootView.findViewById(R.id.descripcion_desc);
        textView.setText(descip);



        return rootView;
    }


}

Suggestion - Dagger and Dependency Injection

Dependency injection support which is offered by Dagger tool can make our lives more pleasant. Moreover, writing tests is more easier.

I would enjoy contributing to a guide about this. Let me know if you have an interest.

EndlessScrollListener and fragments

Hello,
im implementing EndlessScrollListener inside fragment.
I fetch data from web service and fill a list.
I saw that you implement EndlessScrollListener inside onCreate in Activity.
Where dou you suggest implementing it in Fragment?
Tried inside onCreateView but nothing happens..
Thank you in advance.

Displaying remote images the hard way

Hi Nathan (@nesquena). I had a question about the android guide - https://github.com/thecodepath/android_guides/wiki/Sending-and-Managing-Network-Requests#displaying-remote-images-the-hard-way.

I followed along the tutorial and tried loading and displaying remote images in a ListView without using an third party library. It seems to work for a single image url, but when you have an ArrayList of image urls that you're looping through with the help of an Adapter, I think the AsyncTask is loading all the images into each ImageView - so each ImageView in the ListView loops through and displays all images one by one.

My code is here - https://github.com/medha/Panache. Any idea why this could be happening? I feel the AsyncTask takes its time to load the images, and when onPostExecute() is called, maybe it has so many images in the buffer that it loads them all?

Thanks,
Medha

Description of AsyncTask

The current description of AsyncTask is "AsyncTask is a mechanism for executing long running operations in a background thread without having to manually handle thread creation or execution.".
However, in the official Android API AsyncTask has the following description ".. AsyncTasks should ideally be used for short operations (a few seconds at the most)".
It goes on to mention "If you need to keep threads running for long periods of time, it is highly recommended you use the various APIs provided by the java.util.concurrent pacakge such as Executor, ThreadPoolExecutor and FutureTask."
Based on the above I recommend a revision of the AsyncTask description.

Suggestion - Setting up a RemoteControlClient

I've been trying to set up a RemoteControlClient to display the Mediaplayer's current item on the Lockscreen, but not had much luck. There aren't many guides available on how to do this.

A proper integration guide would be very helpful to myself, and others.

Cheers!

Suggestion - Must Have Libraries: Error reporting: ACRA

Hi all,
I think ACRA is one of the most important libraries for Android developers as it allows you to catch every single bug (well, almost :-)) in your app. You can find details here http://acra.ch/

Let me know if you like the idea. I can prepare a draft, but my writing will require some editing since I am not a native speaker.

BR,
Yuriy

Managing Network Callbacks

Guide on managing callback complexity

Could you please send me some code example for structuring a chain of callbacks?

For example using includes to join data or ParseRelation to load associations.

Also, move the callbacks into an object with each request in a method and then use an interface to send out the requests (pseudo-code):

class ObjectFetcher {
    public interface FetcherCallbacks {
         void onFirstDataLoaded(Model impartialData);
         void onAllDataLoaded(Model data);
    }

    FetcherCallbacks callback;
    int requestsLoadedFlag = 0;

    public ObjectFetcher(FetcherCallbacks callback) {
     this.callback = callback;
    }

    public void loadAll() {
         sendFirstRequest();
         sendSecondRequest();
         sendThirdRequest(); 
    }

    private void sendFirstRequest() {
          object.findAllInBackground(new Parse {
               void onDone(Error error) {
                    requestsLoadedFlag +=1;
                     // STORE DATA IN MEMBER VARIABLE HERE
                    callback.onFirstDataLoaded(data);
                    sendFinalDataWhenReady();
               }
          });
    }

    private void sendSecondRequest() {
          object.findAllInBackground(new Parse {
               void onDone(Error error) {
                    requestsLoadedFlag +=1;
                    // STORE DATA IN MEMBER VARIABLE HERE
                    sendFinalDataWhenReady();
               }
          });
    }

   private void sendThirdRequest {
       object.findAllInBackground(new Parse {
               void onDone(Error error) {
                    requestsLoadedFlag +=1;
                    // STORE DATA IN MEMBER VARIABLE HERE
                    sendFinalDataWhenReady();
               }
        }
   } 

   private void sendFinalDataWhenReady() {
      if (requestsLoadedFlag == 3) {
          callback.onAllDataLoaded(data1, data2, data3);
      } 
   }
}

and then use with something like:

ObjectFetcher fetcher = new ObjectFetcher(new FetcherCallbacks() {
     void onFirstDataLoaded {
          // … callback fired here
     }

    void onAllDataLoaded {
          // … callback fired here
     }
})

Note that this is psuedocode but hope it gives you an idea of how to manage things using objects and interface callbacks.

Create hosted front-end for wiki

We've created a first stab at a hosted version of the wiki which should include:

  • Full indexed search of wiki content
  • Better look and feel (eventually)
  • Table of contents for each page (quick jumping between sections)
  • Eventually support multiple development platforms

Here's the start (borrowing from github wiki style and powered by the git wiki): http://guides.thecodepath.com/android

If anyone can help out with the design, please reach out to me at nathan (at) thecodepath (dot) com

Feature - In-app billing guide

I think it would be good if there was a guide on the implementation/usage of the in-app billing library

P.S. work guys! Even as a more experienced developer I have learned some new things here :)

Broken Link: guide for how to "embed the test project within our existing application"

Broken link:

"If we want to embed the test project within our existing application within a folder, check out this step-by-step guide."

Found on this page:

http://guides.codepath.com/android/Android-Unit-and-Integration-testing#android-testing-framework

After some limited googling, it seems that this set of instructions was for Eclipse, and some further googling suggests that a test/ subdirectory inside a project (possibly a subproject) seems to cause problems in Eclipse. Here's is Google's documentation for testing inside Eclipse: http://developer.android.com/tools/testing/testing_eclipse.html

Having a testing subdirectory inside a project doesn't seem to be a problem in Android Studio. Here is a video how to do this (not necessarily the greatest video, but a good one): https://www.youtube.com/watch?v=z47B1nhC3K0

I'll leave it to more experienced Android developers to decide how to rewrite this section.

Suggestion - Otto

If you want to build your apps in way that they have loose coupling between blocks, which could be switched in very easy way you definitely have to read about Otto!.
In short, Otto is an event bus designed to decouple different parts of your application.

I would enjoy contributing to a guide about this. Let me know if you have an interest.

How to update data from an activity to a fragment

once applied the Adapter, I want to change a textfield and some images that are the FirstGragment, that way I can do

question from MainActivity Adapter after this,

TextView textview = (TextView) findViewById (R.id.descripcion_desc);
         textView.setText (text);

but the app falls.

Nice ways to handle screen rotation

I think that it would be nice to have a tutorial on things to keep and things to release and rebuild on screen orientation changes as well as nice ways to do it on asyncs, fragments, dialogs, dialogFragments, and activities.

Split interaction and navigation categories

I think the Interaction and Navigation category is a bit too long and interlaced. Intents is a large enough topic that, with some growth, it could be put into it's own category.

I suggest the hierarchy (using the existing pages):

Interaction

  • View Event Listeners (Clicks, Key Presses, Updates)
  • Exploring the ActionBar (includes adding ActionItems)
  • Displaying Toasts (Quick notices and includes custom views)
  • Common Navigation Paradigms (i.e Tabs, Swipe-able Views, Pull-out Drawer)
  • Extended ActionBar Guide (Split-bar, Custom ActionBar, etc)
  • Gestures and Touch Events (Swipe, Shake, or Dragging Events)
  • Menus and Popups (Context Menu, PopupMenu, PopupWindow)
  • Dialogs with DialogFragment (Displaying a content overlay)

Intents

  • Navigating Activities with Intents (Communicating between Activities)
  • Common Implicit Intents (Making a Call, Sending a Text, Opening a URL)
  • Sharing Content with Intents (and ShareActionProvider)
  • Navigation and Task Stacks (Controlling the behavior of the task stack)

Not able to run robolectric with eclipse

I have tried the same way and the same jar what you have mentioned i am getting the below error.Its seems its trying to download something from maven repo infact i am using ant build.

Unable to resolve artifact: Missing:

  1. org.ccil.cowan.tagsoup:tagsoup:jar:1.2

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.ccil.cowan.tagsoup -DartifactId=tagsoup -Dversion=1.2 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.ccil.cowan.tagsoup -DartifactId=tagsoup -Dversion=1.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) org.ccil.cowan.tagsoup:tagsoup:jar:1.2

  1. org.json:json:jar:20080701

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.json -DartifactId=json -Dversion=20080701 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.json -DartifactId=json -Dversion=20080701 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) org.json:json:jar:20080701

  1. org.robolectric:android-all:jar:4.1.2_r1-robolectric-0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.robolectric -DartifactId=android-all -Dversion=4.1.2_r1-robolectric-0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.robolectric -DartifactId=android-all -Dversion=4.1.2_r1-robolectric-0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) org.robolectric:android-all:jar:4.1.2_r1-robolectric-0


3 required artifacts are missing.

for artifact:
org.apache.maven:super-pom:pom:2.0

from the specified remote repositories:
sonatype (https://oss.sonatype.org/content/groups/public/),
central (http://repo1.maven.org/maven2)

at org.apache.maven.artifact.ant.DependenciesTask.doExecuteResolution(DependenciesTask.java:268)
at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:168)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:751)
at org.robolectric.MavenDependencyResolver.getLocalArtifactUrls(MavenDependencyResolver.java:32)
at org.robolectric.CachedDependencyResolver.getLocalArtifactUrls(CachedDependencyResolver.java:47)
at org.robolectric.RobolectricTestRunner.createRobolectricClassLoader(RobolectricTestRunner.java:167)
at org.robolectric.RobolectricTestRunner.createSdkEnvironment(RobolectricTestRunner.java:137)
at org.robolectric.RobolectricTestRunner$3.create(RobolectricTestRunner.java:324)
at org.robolectric.EnvHolder.getSdkEnvironment(EnvHolder.java:21)
at org.robolectric.RobolectricTestRunner.getEnvironment(RobolectricTestRunner.java:322)
at org.robolectric.RobolectricTestRunner.access$300(RobolectricTestRunner.java:63)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:219)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:194)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:

  1. org.ccil.cowan.tagsoup:tagsoup:jar:1.2

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.ccil.cowan.tagsoup -DartifactId=tagsoup -Dversion=1.2 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.ccil.cowan.tagsoup -DartifactId=tagsoup -Dversion=1.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) org.ccil.cowan.tagsoup:tagsoup:jar:1.2

  1. org.json:json:jar:20080701

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.json -DartifactId=json -Dversion=20080701 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.json -DartifactId=json -Dversion=20080701 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) org.json:json:jar:20080701

  1. org.robolectric:android-all:jar:4.1.2_r1-robolectric-0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.robolectric -DartifactId=android-all -Dversion=4.1.2_r1-robolectric-0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.robolectric -DartifactId=android-all -Dversion=4.1.2_r1-robolectric-0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) org.robolectric:android-all:jar:4.1.2_r1-robolectric-0


3 required artifacts are missing.

for artifact:
org.apache.maven:super-pom:pom:2.0

from the specified remote repositories:
sonatype (https://oss.sonatype.org/content/groups/public/),
central (http://repo1.maven.org/maven2)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:360)
at org.apache.maven.artifact.ant.DependenciesTask.doExecuteResolution(DependenciesTask.java:263)
... 27 more

Reverse Endless Scrolling in a ListView

@nesquena I am using this library for reverse endless scrolling in a listview. I am facing a issue, once it starts scrolling, it keeps on scrolling to the start of the listview in a loop. I have a listView with android:stackFromBottom="true" and android:transcriptMode="normal". Is there a way to do this?

List Filtering

Easy ways to create filtered lists that filters based on what is being searched for.

Wiki Discussion Thread

Issue for people that have questions about potential changes on the wiki. Post any questions or discussions here.

Suggestion - Images

One thing that would be helpful, if it's possible, is images to accompany some of the articles, especially those working with graphics or animation.

Endless Adapter, loading twice on Create

Hello , im using the endless adapter in my project and i noticed that when first loading activity, it triggers twice the web service method that populates the grid with data. I use a custom adapter.
Also im getting the feeling that it is replacing the data in grid view and not appending them.

My code:

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

    gridlist = (GridView) findViewById(R.id.gridImages);
    gridlist.setOnScrollListener(new EndlessScrollListener() {
        @Override
        public void onLoadMore(int page, int totalItemsCount) {

            // this is calling the web service and is being called twice onCreate
            createQuery(searchterm);
        }
    });
});

its there anything that i can do to have a smoother effect for appending data to grid view and not loading twice.

"Developing our First App" section has an error for reading/writing files

The tutorial implies that the code for onCreate should look like this:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_todo);

    lvItems = (ListView) findViewById(R.id.lvItems);
    itemsAdapter = new ArrayAdapter<String>(this,   
            android.R.layout.simple_list_item_1, items);
    lvItems.setAdapter(itemsAdapter);
    setupListViewListener();

    readItems();        
}

but I find that it has to look this way:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_todo);

    lvItems = (ListView) findViewById(R.id.lvItems);
    readItems();        
    itemsAdapter = new ArrayAdapter<String>(this,   
            android.R.layout.simple_list_item_1, items);
    lvItems.setAdapter(itemsAdapter);
    setupListViewListener();
}

Otherwise I get array out of bounds exceptions when I try to delete items.

Master List: Cliffnote Topic Requests

This is the master list of things that need to be added / improved on the cliffnotes. If you see an important topic missing here, please reply below!

Incomplete stubs that need attention to be completed (please help out if you can):

A few topics we could use help developing cliffnotes for:

Production Topics:

Workflow Tools:

  • Crashlytics
  • Stripe (#73)
  • OTA
  • Facebook SDK
  • Updated Jenkins
  • Advanced Gradle (Flavors, Tasks, Deps)

More advanced topics that could use cliffnotes by experts:

  • Creating a Custom Keyboard (#137)
  • Security for Android
  • Native Development Kit (NDK)
  • Binder Inter-Process Communications (See Here)

Any help starting these cliffnotes would be appreciated! Feel free to add other requests as an issue or to this thread! If you are interested in contributing, please check out the contributing guidelines to understand the philosophy of the guides.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.