﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Crosslight - Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Thu, 05 Mar 2015 10:03:25 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Yudi,&lt;/p&gt;&lt;p&gt;Thank you for your efforts.&lt;/p&gt;&lt;p&gt;This helped a lot.&lt;/p&gt;&lt;p&gt;Thomas&lt;br&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Wed, 04 Mar 2015 05:24:09 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Sorry for the delay in sending this.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I created two Android emulators with following specification:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="color: #1f497d;"&gt;&lt;li&gt;Name: Tablet_HW&lt;br&gt;Target: Android 4.2.2 - API Level 17&lt;br&gt;Keyboard: Hardware keyboard present enabled&lt;/li&gt;&lt;li&gt;Name: AndroidKitKatWithKeyboard&lt;br&gt;Target: Android 4.4.2 - API Level 19&lt;br&gt;Keyboard: Hardware keyboard present enabled&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Next, deploy CrossFragMenu app into those emulators and the result is as follow:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;CrossFragMenu deployed on 7" tablet with hardware button.&lt;/span&gt;&lt;/p&gt;
&lt;img src="http://www.intersoftpt.com/Community/Attachments/4323/Table_HW_ButtonJB.png" style="height: 488px; width: 386px;"&gt;&lt;br&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;CrossFragMenu deployed on 7" tablet with software button (no hardware button).&lt;/span&gt;&lt;/p&gt;
&lt;img src="http://www.intersoftpt.com/Community/Attachments/4323/Table_SW_ButtonJB.png" style="height: 488px; width: 386px;"&gt;&lt;br&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;In my opinion, if hardware button exist then menu will not displayed in the top right corner (it will show the menu when &lt;em&gt;menu&lt;/em&gt; hardware button is pressed). If hardware button doesn't exist then Android will automatically display the menu in the top right corner.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I have re-modified CrossFragMenu which force use of overflow menu on devices with hardware button. This version of CrossFragMenu now has overflow menu (in the top right corner) appearing on devices with hardware button. However, there are some issues left with this version of CrossFragMenu app.&lt;/span&gt;&lt;/p&gt;
&lt;img src="http://www.intersoftpt.com/Community/Attachments/4323/CrossFrag-Remodified.png" style="height: 488px; width: 386px;"&gt;&lt;br&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;This approach requires developer to handle OnCreateOptionsMenu and OnKeyUp (manual overflow-management). Please note this version might not support binding on the menu. Please find the sample in the attachment and let me know your response.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Fri, 27 Feb 2015 07:35:25 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Yudi,&lt;/p&gt;&lt;p&gt;I just tested the reworked CrosFragMenu sample. I cleaned the solution and applied the nightly build (195).&lt;/p&gt;&lt;p&gt;Unfortunately, my result is different than yours. I have no menu in the top right corner. The "Delete All" only appears at the bottom when I hit the left hardware button.&lt;/p&gt;&lt;p&gt;For testing I used my Galaxy Tablet (Samsung SM-T310).&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Thomas&lt;br&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Tue, 17 Feb 2015 22:02:40 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;blockquote&gt;By the way, the Map sample crashes when you have no Internet connection. That is not very good.&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Thank you for the feedback about the problem in Map sample. This problem has been forwarded to Crosslight development team. It is filed under CROS-726.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I will keep you informed with any news I heard from the team regarding CROS-726.&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;To see exactly what I need, please have a look at the MyInventory sample. Do a long click on one of the items. The action bar changes and you can see a "More" menu with sub menu entries. That is what I want to achieve.&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The "More" menu in MyInventory sample uses popup menu. I have created a backlog regarding popup menu in fragment. It is filed under CROS-729.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;In the meantime, you can check about how to create popup menu and handling click events (when user select a menu item) in http://developer.android.com/guide/topics/ui/menus.html#PopupMenu.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;&lt;strong&gt;Edited on February 22, 2015 11:05 PM&lt;br&gt;Reason: Propose a solution&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I'd like to propose a solution for the Crosslight Android fragment menu.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The proposed solution is as follow:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Step 1: Edit Styles.xml file and add following style to override drawable id for overflow menu in Android theme as seen in the following snippet code.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;lt;resources&amp;gt;
  &amp;lt;style name="Theme.Splash" parent="android:Theme"&amp;gt;
    &amp;lt;item name="android:windowBackground"&amp;gt;@drawable/light_splash&amp;lt;/item&amp;gt;
    &amp;lt;item name="android:windowNoTitle"&amp;gt;true&amp;lt;/item&amp;gt;
  &amp;lt;/style&amp;gt;
  &amp;lt;style name="Your.Theme" parent="@android:style/Theme.Holo.Light"&amp;gt;
    &amp;lt;item name="android:actionOverflowButtonStyle"&amp;gt;@style/OverFlow&amp;lt;/item&amp;gt;
  &amp;lt;/style&amp;gt;
  &amp;lt;!-- Styles --&amp;gt;
  &amp;lt;style name="OverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow"&amp;gt;
    &amp;lt;item name="android:src"&amp;gt;@drawable/ic_menu_moreoverflow_normal_holo_dark&amp;lt;/item&amp;gt;
  &amp;lt;/style&amp;gt;
&amp;lt;/resources&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Step 2: Use the new created theme in Android Manifest.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="CrossFragMenu.Android" android:installLocation="preferExternal"&amp;gt;
	&amp;lt;uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" /&amp;gt;
	&amp;lt;application android:label="CrossFragMenu.Android"  android:icon="@drawable/icon" android:theme="@style/Your.Theme"&amp;gt;
	&amp;lt;/application&amp;gt;
&amp;lt;/manifest&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Step 3: Edit calcmenu.xml into the following:&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&amp;gt;
    &amp;lt;item android:id="@+id/DeleteAllButton"
          android:icon="@drawable/ic_action_discard"
          android:title="Delete all"
          android:showAsAction="never"/&amp;gt;
&amp;lt;/menu&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Save all the changes and the result should look like this (on Samsung GT-P3110).&lt;/span&gt;&lt;/p&gt;
&lt;img src="http://www.intersoftpt.com/Community/Attachments/4323/AndroidFragmentMenu.png" style="width: 300px; height: 512px;"&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I enclosed the modified version of CrosFragMenu project for your reference. Please let us know whether this helps or not.&lt;/span&gt;&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;&lt;strong&gt;Edited on February 23, 2015 09:20 PM&lt;br&gt;Reason: Update information about CROS-726&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I'd like to inform you that the nightly-build which fixes CROS-726 (causing map sample crashes when there is no internet connection) is now available in &lt;a href="http://git.intersoftpt.com/projects/CROS/repos/updates/browse/Crosslight3_0_5000_195" target="_blank"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The nightly build has been tested in my end and the reported problem is no longer persist. Please feel free to let me know if you have different result.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Thu, 12 Feb 2015 14:27:05 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Yudi,&lt;/p&gt;&lt;p&gt;I am mainly testing on Android 4.1.2 and 4.2.2. But the Android version does not play any role.&lt;/p&gt;&lt;p&gt;Please, have a look at the Map sample. When you go to "Alternative Routes" you can see "Change Route" in the upper right corner. This is applies through a menu. Other views like "Simple Marker" don't have a menu in the upper right corner.&lt;/p&gt;&lt;p&gt;When you click on "Change Route" a selection dialog appears. What I want to achieve is that instead of the dialog there should be a sub menu poping up when I click on "Change Route". How can I do this?&lt;/p&gt;&lt;p&gt;To see excatly what I need, please have a look at the MyInventory sample. Do a long click on one of the items. The action bar changes and you can see a "More" menu with sub menu entries. That is what I want to achive.&lt;/p&gt;&lt;p&gt;Please, have a look at the original sample I attached to the first post and try to apply a menu with a sub menu.&lt;/p&gt;&lt;p&gt;By the way, the Map sample crashes when you have no Internet connection. That is not very good.&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Thomas&lt;br&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Wed, 11 Feb 2015 08:40:02 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;blockquote&gt;... There is no menu in the top right corner within the action bar. When hitting the left hardware button the menu slides in from the bottom.&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Could you please inform me about the Android version of your device (for example: Samsung GT-P3110 running on Android 4.1.2) and the screenshot which shows the quoted problem?&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Fri, 06 Feb 2015 09:01:41 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Yudi,&lt;/p&gt;&lt;p&gt;I just tried your proposed menu definition. Now I have a different result. There is no menu in the top right corner within the action bar. When hitting the left hardware button the menu slides in from the bottom. This is quite nice but it does not solve the initial requirement.&lt;/p&gt;&lt;p&gt;Will there be another fix? Because I wanted to have a menu in the top right corner with the 3 dots icon. Clicking on the 3 dots icon should open a sub menu. Please, see the initial post and the sample for detailed information.&lt;/p&gt;&lt;p&gt;Thanks, &lt;/p&gt;&lt;p&gt;Thomas&lt;br&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Wed, 28 Jan 2015 07:49:59 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Sorry for the delay in sending this.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The sample project is now being investigated by Crosslight development team. I will let you know any news I heard from the team regarding this.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Edited on February 1, 2015 9:36 PM&lt;br&gt;Reason: Update information about sample&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I managed to show the submenu when clicking on the menu by modifying calcmenu.xml file into the following.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&amp;gt;  
    &amp;lt;item android:id="@+id/DeleteAllButton"
        android:icon="@drawable/ic_action_discard"
        android:title="Delete all"
        android:showAsAction="never"/&amp;gt;
&amp;lt;/menu&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please try to modify the calcmenu.xml file and let me know whether this help or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Tue, 27 Jan 2015 15:28:56 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Any news?&lt;br&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android Fragment Menu</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-Fragment-Menu/</link><pubDate>Fri, 23 Jan 2015 08:44:15 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Crosslight Support,&lt;/p&gt;&lt;p&gt;I created a new Crosslight solution (Android only) with the project wizard in Visual Studio. As template I used the "Navigation drawer".&lt;/p&gt;&lt;p&gt;Next I created a "menu" folder in the "Resource" folder of the Android project. There I added a new menu xml file with my required menu definition (main menu with the three dots and a sub menu 'delete all').&lt;/p&gt;&lt;p&gt;Within the app I have two fragments. One for the "Simple Page" and one for the "About this app" page. What I what to achive is to apply the menu only to the "About this app" page. The other fragment should have no menu.&lt;/p&gt;&lt;p&gt;So I assigned the menu in the AboutFragment with an override of the MenuLayoutId. To see if the menu is working I then created a binding in the AboutBindingProvider.&lt;/p&gt;&lt;p&gt;After starting the app the result is somehow different as I expected.&lt;/p&gt;&lt;p&gt;First there is no menu on the simple page (ok). When navigating to the about page the menu shows up (ok). Clicking on the menu shows no submenu (not ok). Doing a long click on the menu shows an empty menu entry (not ok).&lt;/p&gt;&lt;p&gt;What am I doing wrong? I used the latest version of Crosslight (Crosslight3_0_5000_184). A sample is attached.&lt;/p&gt;&lt;p&gt;When I attach the menu to an activity it works as expected. But when I do a long click there is also an empty menu item shown.&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Thomas&lt;/p&gt;</description></item></channel></rss>