1
0

I have noticed when Compiling the Android or Amazon exports for projects that Customers have sent me that you are still using FILL_PARENT.

FILL_PARENT has been renamed MATCH_PARENT in API Level 8 and higher

I have noticed that you already use MATCH_PARENT in other places so for the most part it is just some minor changes that needs to be done to replace FILL_PARENT with MATCH_PARENT
Example:
android\res\layout\main.xml
android:id="@+id/main" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> org.cocos2dx.lib.Cocos2dxEditText android:id="@+id/textField" android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="@null"/ org.cocos2dx.lib.Cocos2dxGLSurfaceView android:id="@+id/game_gl_surfaceview" android:layout_width="fill_parent" android:layout_height="fill_parent"/
This Should read as

android:id="@+id/main" android:layout_width="MATCH_PARENT" android:layout_height="MATCH_PARENT" android:orientation="vertical"> org.cocos2dx.lib.Cocos2dxEditText android:id="@+id/textField" android:layout_height="wrap_content" android:layout_width="MATCH_PARENT" android:background="@null"/> org.cocos2dx.lib.Cocos2dxGLSurfaceView android:id="@+id/game_gl_surfaceview" android:layout_width="MATCH_PARENT" android:layout_height="MATCH_PARENT"/> !-- com.mopub.mobileads.MoPubView android:id="@+id/adview" android:layout_width="MATCH_PARENT" android:layout_height="50dp" android:layout_gravity="bottom" > /com.mopub.mobileads.MoPubView> com.applovin.adview.AppLovinAdView xmlns:applovin="http://schemas.applovin.com/android/1.0" android:id="@+id/ALadview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:visibility="visible" applovin:loadAdOnCreate="true" / -->

android\src\org\cocos2dx\lib\Cocos2dxActivity.java

// FrameLayout ViewGroup.LayoutParams framelayout_params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT); FrameLayout framelayout = new FrameLayout(this); framelayout.setLayoutParams(framelayout_params); // Cocos2dxEditText layout ViewGroup.LayoutParams edittext_layout_params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); Cocos2dxEditText edittext = new Cocos2dxEditText(this); edittext.setLayoutParams(edittext_layout_params);

This should read

// FrameLayout ViewGroup.LayoutParams framelayout_params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); FrameLayout framelayout = new FrameLayout(this); framelayout.setLayoutParams(framelayout_params); // Cocos2dxEditText layout ViewGroup.LayoutParams edittext_layout_params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); Cocos2dxEditText edittext = new Cocos2dxEditText(this); edittext.setLayoutParams(edittext_layout_params);

android\src\org\cocos2dx\lib\Cocos2dxEditBoxDialog.java

final LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
final LinearLayout.LayoutParams editTextParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);

These should read

final LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
final LinearLayout.LayoutParams editTextParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.