Mercurial > dwindows
comparison android/dw.cpp @ 2675:a7868380098f
Android: LinearLayout does not allow null views, if null, create a Placeholder view.
Pack the empty placeholder into the LinearLayout to accomplish the same effect.
This allows us to center things with expandable placeholders.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 19 Oct 2021 11:01:16 +0000 |
parents | 0ed61ddb9957 |
children | 95f61d3f3d0d |
comparison
equal
deleted
inserted
replaced
2674:dd0b29320a3d | 2675:a7868380098f |
---|---|
1429 /* Internal box packing function called by the other 3 functions */ | 1429 /* Internal box packing function called by the other 3 functions */ |
1430 void _dw_box_pack(HWND box, HWND item, int index, int width, int height, int hsize, int vsize, int pad, const char *funcname) | 1430 void _dw_box_pack(HWND box, HWND item, int index, int width, int height, int hsize, int vsize, int pad, const char *funcname) |
1431 { | 1431 { |
1432 JNIEnv *env; | 1432 JNIEnv *env; |
1433 | 1433 |
1434 if(box && item && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) | 1434 if(box && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) |
1435 { | 1435 { |
1436 // First get the class that contains the method you need to call | 1436 // First get the class that contains the method you need to call |
1437 jclass clazz = _dw_find_class(env, DW_CLASS_NAME); | 1437 jclass clazz = _dw_find_class(env, DW_CLASS_NAME); |
1438 // Get the method that you want to call | 1438 // Get the method that you want to call |
1439 jmethodID boxPack = env->GetMethodID(clazz, "boxPack", "(Landroid/view/View;Landroid/view/View;IIIIII)V"); | 1439 jmethodID boxPack = env->GetMethodID(clazz, "boxPack", "(Landroid/view/View;Landroid/view/View;IIIIII)V"); |