アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

Add a Login with Amazon Button to your app

Login with Amazon provides several standard buttons you can use to prompt users to login from your app. This section gives steps for downloading an official Login with Amazon image and pairing it with an Android ImageButton.

  1. Add a standard ImageButton to your app. For more information on Android buttons and the ImageButton class, see Buttons on developer.android.com.
  2. Give your button an id. In the button XML declaration, set the android:id attribute to @+id/login_with_amazon. For example:

    android:id="@+id/login_with_amazon"
    
  3. Choose a button image. Consult our Login with Amazon Button Guidelines for a list of buttons you can use in your app. Download a copy of the LWA_Android.zip file. Extract a copy of your preferred button for each screen density your app supports (xxhdpi, xhdpi, hdpi, mdpi, or tvdpi). For more information on supporting multiple screen densities in Android, see Alternative Layouts in the "Supporting Multiple Screens" topic on developer.android.com.
  4. Copy the appropriate button image files to your project. For each screen density you support (xhdpi, hdpi, mdpi, or ldpi), copy the downloaded button to the res/drawable directory for that screen density.
  5. Declare the button image. In the button XML declaration, set the android:src attribute to the name of the button you have chosen. For example:

    android:src="@drawable/btnlwa_gold_loginwithamazon.png"
    
  6. Load your app, and verify that the button now has a Login with Amazon image. You should verify the button displays properly for each screen density you support.