In 2 seperate web applications, one using asp.net 3.5 with vs2008 and 4.0 with vs2010, the child menu items of an asp.net menu dissappear only on android browser. When the main menu item is clicked the children flash for a split second then dissappear.
Edited version of menu is as follows:
<asp:Menu ID="MainMenuEmp" runat="server" CssClass="menuASP" Orientation="Horizontal" DynamicHorizontalOffset="0"
StaticDisplayLevels="1" StaticEnableDefaultPopOutImage="false" DynamicVerticalOffset="1" visible="false"
>
<StaticMenuitemStyle CssClass="menuitemASPStatic" />
<StaticHoverStyle CssClass="menuASPStaticHover" />
<StaticSelectedStyle CssClass="menuASPStaticHover" />
<DynamicMenuStyle CssClass="menuASPDynamicMenuStyle" />
<DynamicMenuitemStyle CssClass="menuitemASPDynamic" />
<DynamicHoverStyle CssClass="menuASPDynamicHover" />
<DynamicSelectedStyle CssClass="menuASPDynamicHover" />
<Items>
<asp:MenuItem Text="HISTORY" Value="#" navigateurl="~/clientpages/jobhistory.aspx" />
<asp:MenuItem Text="NEW ORDER" Value="#" navigateurl="~/clientpages/newjob.aspx" />
<asp:MenuItem Text="CLIENT INFO" Value="#" navigateurl="~/clientpages/clientinfo.aspx" />
<asp:MenuItem Text="MGMT" Value="#" Selectable="false" >
<asp:MenuItem Text="Inspections" Value="#" navigateurl="~/clientpages/MgrInspection.aspx" />
<asp:MenuItem Text="Tasks" Value="#" navigateurl="~/clientpages/MgrInspectionStatus.aspx"/>
<asp:MenuItem Text="Last Vehicle Inspection" Value="#" navigateurl="~/clientpages/MgrInspectionVehicle.aspx"/>
</asp:MenuItem >
<asp:MenuItem Text="JOB MGMT" Value="#" navigateurl="~/clientpages/jobdailyview.aspx"/>
</Items>
</asp:Menu>
partial css is as follows: (z-index is needed to get sub menu's to show on other browsers).
.menuASPDynamicMenuStyle
{
z-index: 999; /*padding: 4px 0 3px 0;*/
padding: 0;
margin-top: 1px;
background-color: #F8F8F8;
}
Menu is on master page with toolscriptmanager on page.
The following code is in init event of masterpage:
If Request.ServerVariables("http_user_agent").IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) <> -1 Then
Page.ClientTarget = "uplevel"
End If
This was necessary to get child menu's to show on other browsers as well. I tried:
page.clienttarget = "uplevel"
without the condition, but, this did not work.
I have also tried adding an android browser file, but, this did not work.
I have scoured the web for a few days. There a few similar questions, but, no answers. Has anyone had same problem? The menu works fine in ie, chrome, ff, safari, ipad, but, not on android mobile devices and not on android tablets.
There is no hover on an Android but my asp menu works if I hold down on the parent menu. Sadly I also get the browser menu when I hold down on it. You will have to design a menu that opens the child items with a single click. This cannot be done with the asp menu.
menus are not disappearing but the page is posting back..
just set navigateUrl property to 'javascript:return false'
I found a way to fix this.
Either do
document.body.setAttribute('onclick', 'setTimeout(function () { }, 0);');
in a startup script
or let the body tag look like this
<body onclick="setTimeout(function () { }, 0);">
Then it works on Android. I haven't tested on other iPhone or so.
(I have also tried some more conventional ways of adding this dummy script, but it did not work.)
Related
I am using Xamarin.forms version 3.0.0.561731 for the Application.The issue is, when a button is clicked another button like object at top left corner is appearing for few seconds which is very annoying, I have been searching for couple of hours and tried what ever stuff found but no luck.
I tried upgrading to latest xamarin.forms version and also tried to downgrading it upto 2.4.0 but still the issue exists.
Please guide me to get rid of that visual effect issue while tapping/clicking on button.
<Button BorderRadius="5" Text="Continue" HorizontalOptions='FillAndExpand' BackgroundColor="#1976D2" TextColor="White" Command="{Binding ContinueFormCommand}">
<Button.FontSize>
<OnIdiom x:TypeArguments="x:Double">
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="x:Double" iOS="13" Android="15" WinPhone="30"/>
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="x:Double" iOS="13" Android="15" WinPhone="30"/>
</OnIdiom.Tablet>
</OnIdiom>
</Button.FontSize>
<Button.HeightRequest>
<OnIdiom x:TypeArguments="x:Double">
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="x:Double" iOS="13" Android="45" WinPhone="30"/>
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="x:Double" iOS="13" Android="15" WinPhone="30"/>
</OnIdiom.Tablet>
</OnIdiom>
</Button.HeightRequest>
</Button>
I got this issue for Samsung device.
This issue is open for way too long on GitHub here and here.
As a work around, you can using Xamarin.Forms v2.5.0.122203 which doesn't have the issue.
Currently I am working on Android TV app.
I have used Android Lean back support library.
I have added one ListView, but I can not able to select any of the item from listView with real device's remote. However, I can able to select item of listView on my Android Virtual Device with the help of mouse.
Here is my sample code of listView:
customViewOrders = new CustomViewOrders(getActivity().getBaseContext(), arrayViewOrders);
lstViewOrder.setAdapter(customViewOrders);
Here, arrayViewOrders is my ArrayList which contains data received from JSON webservice.
Here is my JSON Response:
{
"order":[
{
"0":"13829CF",
"gen_id":"13829CF",
"1":"17534CF",
"2":"Complete",
"ord_status":"Complete",
"3":"Online Preview",
"sta_name":"Online Preview",
"4":"2015-10-27 00:00:00",
"image":"cinereel",
"placed_from":"web"
}
]
}
I have also added following features in AndroidManifest.xml file:
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.hardware.faketouch"
android:required="true" />
So, my question is: how to select anything (i.e. list item, button) in real device with the help of remote?
Finally I got the solution after lots of R&D.
Here is the my solution for directional navigation using Android TV remote.
Firstly, you have to keep focus of any one of items (i.e. Button, TextView, etc.) as below.
And also, you have to apply its nextFocusDown, nextFocusLeft, nextFocusRight & nextFocusUp properties, so that it will fire its relevant event when you click TV remote navigation buttons.
<Button
android:id="#+id/btnSignout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/tvUserName"
android:layout_marginTop="2dp"
android:layout_toLeftOf="#+id/ivUser"
android:width="100dp"
android:nextFocusRight="#+id/ivUser" <!-- On click of right arrow button, focus will be move to ivUser id -->
android:nextFocusUp="#+id/tvUserName" <!-- On click of up arrow button, focus will be move to tvUserName id -->
android:text="#string/signout"
android:textAppearance="?android:textAppearanceMedium">
<requestFocus></requestFocus>
</Button>
For more information, you can refer to:
Android User Interface Design: The Basics of Control Focus Order,
Creating TV Navigation.
I followed the standard procedure to add a Google plus button:
<com.google.android.gms.plus.PlusOneButton
xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus"
android:id="#+id/plus_one_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp"
plus:annotation="bubble"
plus:size="standard(none)" />
It is linked to the app's Google Play page. It is initialized in onResume as recommended:
_PlusOneButton.initialize("https://play.google.com/store/apps/details?id=net.mydomain.myapp", 0);
The button gets the count correctly initially, but the count never changes. The Google Play page shows the count keeps changing (increasing) as expected. I have been curious about activityRequestCode in initialize (String url, int activityRequestCode). I do not know what it does.
Could anyone shed some light on this?
I've just started Windows phone 8 development with previous experience of Android Development.
I was just searching if there is any strings.xml like file in windows phone 8 where we can keep strings and specially color codes. Yes i want to keep my own color codes in windows phone 8 project so that i may refer these colors in my Pages XML and in code.
Suggestions are highly appreciated.
Special color codes can be placed in your App.xaml file in the resources part.
Use like the following:
<Application.Resources>
<SolidColorBrush x:Key="ColorWhite"
Color="#FFFFFFFF" />
<ImageBrush x:Key="BackGroundBrush"
ImageSource="SplashScreenImage.jpg" />
<Style x:Key="MyPageStyle"
TargetType="phone:PhoneApplicationPage">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="Background_WindowsPhone.png"
Stretch="UniformToFill" />
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
In your page you might then use the following:
<phone:ApplicationPage Style="{StaticResource MyPageStyle">
<Grid Background="{StaticResource BackGroundBrush}">
<TextBlock Text="Hi"
Foreground="{StaticResource ColorWhite}" />
</Grid>
</phone:ApplicationPage>
Xml response is like , but in one tag , the text is this:
<Description>
<center><strong><span>Warehouse / Building Maintenance</span></strong></center><br />
<br />
<strong><span>I</span></strong><span>mmediate openings available in the local Perris area for warehouse/building building maintenance positions. <br />
<br />
<strong>Job Description:</strong><br />
</span>
<ul>
<li><span>Associates will be responsible to define pieces of equipment that will paralyze operations if they fail, and plan whatever level of preventative maintenance necessary. <br />
</span></li>
<li><span>
......
similar text
......
</Description>
I can't able to parse it in proper way.
I tried using Jsoup.parse((nodeValue))
and Html.fromHtml(String) also URLEncoder.encode(String)
but its returning simple & symbol thats it.
How to parse this type of response?
A temporary solution could be applying replaceAll("<", "<").replaceAll(">", ">") if API methods aren't working, but arent you supposed to use Html.toHtml(string) when you have stuff encoded and want it to become real html ?
Actually its returning only & symbol , that's because the nodelist item returns only single value.
After using like this:
NodeList fstNm = fstNmElmnt.getChildNodes();
System.out.println("nodefstnm"+fstNm.getLength());
for(int j=0;j<fstNm.getLength();j++) {
String val = ((Node) fstNm.item(j)).getNodeValue();
nodeValue=nodeValue.concat(val);
}
and then parsing with Jsoup., returns what I want.