Copy sample files to create the user interface for the SUP101Sample
application.
Prerequisites
Obtain the text files that contain the code snippets you need to build
the user interface from the
SUP_Android_Custom_Dev_Tutorial_code.zip
file. The code snippets are used to create these classes:
CustomerListAdapter,
DetailActivity, and
SUP101SampleActivity.
- If you are viewing this guide online from the Sybase Product
Documention web site, click SUP_Android_Custom_Dev_Tutorial_code.zip to access the zip archive
containing the text files.
- If you are viewing this guide as a PDF, go to the Sybase Product Documentation
Web site at http://sybooks.sybase.com/nav/summary.do?prod=1289.
Click the link for the Sybase Unwired Platform version that you want. Then, navigate
to this topic in the tutorial, and click the link for the zip file to access the text
files.
- When you created a new Android project at the beginning of the tutorial, a Default
Activity class was automatically generated.
Task- In Windows Explorer, browse to the directory where you saved the ZIP file.
- Copy these Java files: CustomerListAdapter.java,
DetailActivity.java, and SUP101SampleActivity.java.
- In Package Explorer, paste the copied Java files into the
src\com.sybase.sup.samples.objectapi directory in the
SUP101Sample project folder. Choose to copy over any
existing files.
- If you installed the Sybase Unwired Platform server on a system other than the
localhost, you need to modify the HOST IP address in the
SUP101SampleActivity.java file to point to the server.
- In Package Explorer, expand the SUP101Sample
project.
- Under the \src\com.sybase.sup.samples.objectapi folder,
double-click the SUP101SampleActivity.java file.
- Modify the HOST IP address, and Save.
- Browse to the directory where you saved the ZIP file.
- Copy the sample layout XML files: customer.xml,
detail.xml, and main.xml.
- Paste the copied XML files into the res\layout directory in the
SUP101Sample project folder. Choose to copy over any existing
files.