Creating the User Interface

Copy the Java code files, which provide the functionality and layout of the user interface, from the SMP101 Android Project example project archive to the SMP101Android project.

  1. In Windows Explorer, browse to the directory where you saved the SMP101 Android Project example project.
  2. Copy these Java files: CustomerListAdapter.java, DetailActivity.java, and SMP101SampleActivity.java.
  3. In Workspace Navigator, go to SMP101Android and expand \src\com\mycorp\smp101\android\app, then paste the copied Java files, copying over any existing files.
  4. Modify the host IP address in the SMP101SampleActivity.java file to point to the SAP Mobile Server.
    1. In Workspace Navigator, expand the SMP101Android project.
    2. Under the \src\com\mycorp\smp101\android\app folder, double-click the SMP101SampleActivity.java file.
    3. Modify the host IP address, and verify the username and password are valid.
  5. Browse to the directory where you saved the SMP101 Android Project example project.
  6. Copy the sample layout XML files: customer.xml, detail.xml, and main.xml.
  7. In the SMP101Android project folder, go to the res\layout directory and paste the copied XML files, copying over any existing files.
    The SMP101Android project directory should look like this:
    Android Tutorial SMP101Android Sample Directory