After playing in Eclipse for a bit I have a few things I noticed:
1. I like that you added the ability now to specify which menu items get added to the action bar. They appear to be drawing different than standard though (See Images below where Eclipse/Java version fits 3 buttons while B4A only fits 2)
My Code to add them is:
2. A cool addition would also be the Home/App Button (Also pictured below in Upper Left of Java version. I add it and process the event with (Currently I just make it behave as Back, but it can do anything):
3. I have come to love XML Layouts...almost makes me feel like I wasted time developing my View Manager Class since they do the same thing and much more. In the Java version below I just have a simple relative layout within a scrollview layout. Each text auto expands to a MaxLength and MaxEMS along with paddings, margins, etc. I even use sort of a hack to get some advanced IME type functionality using android:digits to limit chars in fields that are not Numeric and it works fine. Next is handled automatically, the keyboard is set to android:windowSoftInputMode="stateUnchanged", and Done is handled with a simple setOnEditorActionListener. All states are automatically saved since all views I give an ID to are in the R file and the default onCreate automatically restores them.
Now, I guess the big question is...how much of this can come over to B4A? We modify the Main XML file, so we work with XML. We create the R file with our resources, so we make use of it already too. What about adding the ability of creating our Layouts in XML? Maybe another LoadLayout that can read from XML? Perhaps we add the XML files like other files, but it parses it and adds our ids to the R file then we have some type of method to get the views by an ID or something like in regular JAVA? Add the ability to specify Font sizes in SP, width sizes in EMS and MaxEMS, etc...even if it is just in the XML capabilities. More options for the R file like right clicking text fields and adding them as a String Resource like Eclipse can and easy access to them.
1. I like that you added the ability now to specify which menu items get added to the action bar. They appear to be drawing different than standard though (See Images below where Eclipse/Java version fits 3 buttons while B4A only fits 2)
My Code to add them is:
B4X:
@SuppressLint("NewApi")
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuItem mnu1 = menu.add(0, 1, 1, "Print Labels");
if (android.os.Build.VERSION.SDK_INT > 10) mnu1.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
MenuItem mnu2 = menu.add(0, 2, 2, "Transfers");
MenuItem mnu3 = menu.add(0, 3, 3, "Upload");
if (android.os.Build.VERSION.SDK_INT > 10) mnu3.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
MenuItem mnu4 = menu.add(0, 4, 4, "Download");
if (android.os.Build.VERSION.SDK_INT > 10) mnu4.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
MenuItem mnu5 = menu.add(0, 5, 5, "Registration");
MenuItem mnu6 = menu.add(0, 6, 6, "Setup");
return true;
}
2. A cool addition would also be the Home/App Button (Also pictured below in Upper Left of Java version. I add it and process the event with (Currently I just make it behave as Back, but it can do anything):
B4X:
if (android.os.Build.VERSION.SDK_INT > 10) getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
break;
}
return true;
}
3. I have come to love XML Layouts...almost makes me feel like I wasted time developing my View Manager Class since they do the same thing and much more. In the Java version below I just have a simple relative layout within a scrollview layout. Each text auto expands to a MaxLength and MaxEMS along with paddings, margins, etc. I even use sort of a hack to get some advanced IME type functionality using android:digits to limit chars in fields that are not Numeric and it works fine. Next is handled automatically, the keyboard is set to android:windowSoftInputMode="stateUnchanged", and Done is handled with a simple setOnEditorActionListener. All states are automatically saved since all views I give an ID to are in the R file and the default onCreate automatically restores them.
Now, I guess the big question is...how much of this can come over to B4A? We modify the Main XML file, so we work with XML. We create the R file with our resources, so we make use of it already too. What about adding the ability of creating our Layouts in XML? Maybe another LoadLayout that can read from XML? Perhaps we add the XML files like other files, but it parses it and adds our ids to the R file then we have some type of method to get the views by an ID or something like in regular JAVA? Add the ability to specify Font sizes in SP, width sizes in EMS and MaxEMS, etc...even if it is just in the XML capabilities. More options for the R file like right clicking text fields and adding them as a String Resource like Eclipse can and easy access to them.