Skip to content

Commit

Permalink
fix : native view changes
Browse files Browse the repository at this point in the history
  • Loading branch information
FenilInfy0m authored and FenilInfy0m committed Mar 9, 2023
1 parent f19b21d commit 144b635
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 14 deletions.
Binary file modified .gradle/7.4/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.4/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 0 additions & 2 deletions adsSdk/src/main/java/com/infyom/adssdk/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ public class Constants {
public static boolean isPreloadedFbNative = false;
public static NativeAd nativeAds = null;
public static AdView adView = null;
public static com.facebook.ads.AdView adViewFb = null;
public static com.facebook.ads.NativeAd nativeAdFb = null;
public static InterstitialAd interAdmob = null;
public static com.facebook.ads.InterstitialAd interFb = null;
public static boolean isAdShowing = false;
Expand Down
10 changes: 4 additions & 6 deletions adsSdk/src/main/java/com/infyom/adssdk/InfyOmAds.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public static void initDefaultValue() {
Constants.isPreloadedFbNative = false;
Constants.nativeAds = null;
Constants.adView = null;
Constants.adViewFb = null;
Constants.nativeAdFb = null;
Constants.interAdmob = null;
Constants.interFb = null;
Constants.isAdShowing = false;
Expand Down Expand Up @@ -179,10 +177,10 @@ public static void enableTestMode(Context context) {
myPref.setFbInterAds("IMG_16_9_LINK#YOUR_PLACEMENT_ID");
myPref.setAdsTime(1);
myPref.setSplashAds(1);
myPref.setAdsType("facebook");
myPref.setFirstAdsType("facebook");
myPref.setSecondAdsType("facebook");
myPref.setThirdAdsType("facebook");
myPref.setAdsType("admob");
myPref.setFirstAdsType("admob");
myPref.setSecondAdsType("admob");
myPref.setThirdAdsType("admob");
myPref.setImageUrl("https://infyom.com/static/f6cef67f4ace05541cc030d1fae4e8a5/ef330/open-source.webp");
myPref.setUrl("https://infyom.com/");
myPref.setInterImageUrl("https://infyom.com/static/f6cef67f4ace05541cc030d1fae4e8a5/ef330/open-source.webp");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void onError(Ad ad, AdError adError) {

if (InfyOmAds.isConnectingToInternet(context)) {
if (loadFail != 3) {
Log.e("N_F_TAG", "onError: "+loadFail );
Log.e("N_F_TAG", "onError: "+loadFail);
loadFail++;
loadFbNative(context, nativeAdLayout, space,isBigNative);
} else {
Expand Down
5 changes: 3 additions & 2 deletions adsSdk/src/main/res/layout/ad_50.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_height="wrap_content"
android:layout_height="110dp"
android:layout_width="match_parent"
android:layout_centerInParent="true"
android:background="@drawable/ads_button_bg"
Expand Down Expand Up @@ -154,9 +154,10 @@
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/cta"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="25dp"
android:background="@drawable/ads_button_bg"
android:textSize="16dp"
android:textAllCaps="false"
android:backgroundTint="?attr/tabSelectedTextColor"
android:textColor="@color/white"
android:lines="1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected void onCreate(Bundle savedInstanceState) {
InfyOmAds.initDefaultValue();
InfyOmAds.showBanner(this,rlBanner,1);

InfyOmAds.showNative(this,rl_native,tv_space,1, InfyOmAds.AdTemplate.NATIVE_100);
InfyOmAds.showNative(this,rl_native,tv_space,1, InfyOmAds.AdTemplate.NATIVE_50);

showAds.setOnClickListener(v -> {
InfyOmAds.showInterstitial(1, this, new Interstitial() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected void onCreate(Bundle savedInstanceState) {


InfyOmAds.showBanner(this,rlBanner,1);
InfyOmAds.showNative(this,rl_native,tv_space,1, InfyOmAds.AdTemplate.NATIVE_100);
InfyOmAds.showNative(this,rl_native,tv_space,1, InfyOmAds.AdTemplate.NATIVE_50);

showAds.setOnClickListener(v -> {
InfyOmAds.showInterstitial(1, this, new Interstitial() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected void onCreate(Bundle savedInstanceState) {
tv_space = findViewById(com.infyom.adssdk.R.id.tv_space);

InfyOmAds.showBanner(this,rlBanner,1);
InfyOmAds.showNative(this,rl_native,tv_space,1, InfyOmAds.AdTemplate.NATIVE_100);
InfyOmAds.showNative(this,rl_native,tv_space,1, InfyOmAds.AdTemplate.NATIVE_50);

showAds.setOnClickListener(v -> {
InfyOmAds.showInterstitial(1, this, new Interstitial() {
Expand Down

0 comments on commit 144b635

Please sign in to comment.