// Path: AccCustomInApps/app/src/main/java/com/accengage/samples/custominapps/customviews/CustomInAppLayout.java
// public class CustomInAppLayout extends LinearLayout {
// 
//     protected InApp mInApp;
// 
//     public CustomInAppLayout(Context context) {
//         super(context);
//     }
// 
//     public CustomInAppLayout(Context context, AttributeSet attrs) {
//         super(context, attrs);
//     }
// 
//     public CustomInAppLayout(Context context, AttributeSet attrs, int defStyleAttr) {
//         super(context, attrs, defStyleAttr);
//     }
// 
//     public void populate(InApp inApp) {
//         mInApp = inApp;
//     }
// }


import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.Toast;
import com.accengage.samples.custominapps.customviews.CustomInAppLayout;
import com.ad4screen.sdk.A4S;
import com.ad4screen.sdk.InApp;
import com.ad4screen.sdk.Log;
import com.ad4screen.sdk.Tag;
                        getA4S().setView("BannerDown");
                        break;
                    case BANNER_OFFER:
                        getA4S().setView("BannerOffer");
                        break;
                    case BANNER_OFFER_PROMOCODE:
                        getA4S().setView("BannerOfferPromo");
                        break;
                    case POPUP_BASIC:
                        getA4S().setView("PopupBasic");
                        break;
                    case POPUP_OFFER:
                        getA4S().setView("PopupOffer");
                        break;
                    case POPUP_PROMOCODE:
                        getA4S().setView("PopupPromo");
                        break;
                }
            }
        });
    }

    @Override
    protected void onResume() {
        super.onResume();

        // Initialize callback in onResume because stopActivity reinitialize callbacks
        getA4S().setInAppInflatedCallback(new A4S.Callback<InApp>() {
            @Override
            public void onResult(InApp inapp) {
// Path: AccCustomInApps/app/src/main/java/com/accengage/samples/custominapps/customviews/CustomInAppLayout.java
// public class CustomInAppLayout extends LinearLayout {
// 
//     protected InApp mInApp;
// 
//     public CustomInAppLayout(Context context) {
//         super(context);
//     }
// 
//     public CustomInAppLayout(Context context, AttributeSet attrs) {
//         super(context, attrs);
//     }
// 
//     public CustomInAppLayout(Context context, AttributeSet attrs, int defStyleAttr) {
//         super(context, attrs, defStyleAttr);
//     }
// 
//     public void populate(InApp inApp) {
//         mInApp = inApp;
//     }
// }


// Path: AccCustomInApps/app/src/main/java/com/accengage/samples/custominapps/MainActivity.java
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.Toast;
import com.accengage.samples.custominapps.customviews.CustomInAppLayout;
import com.ad4screen.sdk.A4S;
import com.ad4screen.sdk.InApp;
import com.ad4screen.sdk.Log;
import com.ad4screen.sdk.Tag;

                        getA4S().setView("BannerDown");
                        break;
                    case BANNER_OFFER:
                        getA4S().setView("BannerOffer");
                        break;
                    case BANNER_OFFER_PROMOCODE:
                        getA4S().setView("BannerOfferPromo");
                        break;
                    case POPUP_BASIC:
                        getA4S().setView("PopupBasic");
                        break;
                    case POPUP_OFFER:
                        getA4S().setView("PopupOffer");
                        break;
                    case POPUP_PROMOCODE:
                        getA4S().setView("PopupPromo");
                        break;
                }
            }
        });
    }

    @Override
    protected void onResume() {
        super.onResume();

        // Initialize callback in onResume because stopActivity reinitialize callbacks
        getA4S().setInAppInflatedCallback(new A4S.Callback<InApp>() {
            @Override
            public void onResult(InApp inapp) {
                CustomInAppLayout customView = AccengageCustomViewFactory.create(MainActivity.this, inapp.getDisplayTemplate());