the lines can't display on android phone
- set the whole app in ios’s style: IonicModule.forRoot(VehicleApp, { mode:'ios' }, {})
- The line of each entry in the list below on the android mobile phone can't display properly, but through the ionic serve, in the PC browser display is normal.
code in template.html:
<ion-list> <button ion-item icon-left> <ion-icon name="car" item-left></ion-icon> one </button> <button ion-item icon-left> <ion-icon name="cash" item-left></ion-icon> two </button> <button ion-item icon-left> <ion-icon name="book" item-left></ion-icon> three </button> </ion-list>
Your system information: ionic-angular: 2.0.0-rc.1 Cordova CLI: 6.3.1 Gulp version: CLI version 1.2.2 Gulp local: Ionic CLI Version: 2.1.1 Ionic App Lib Version: 2.1.1 OS:
Node Version: v6.9.1
Hello, could you post a screenshot of the issue you are seeing on the Android device? Also, what version of Android is the device running?
Hi,Below are screenshots and version information: run ionic serve
template code:
<ion-header> <ion-navbar> <ion-title>Infomation</ion-title> </ion-navbar> </ion-header> <ion-content> <ion-list> <button ion-item > Name </button> <button ion-item > Nickname </button> <button ion-item> Mobile </button> </ion-list> <ion-list> <button ion-item> Other Info </button> </ion-list> </ion-content>
display on Android(Version 5.0.1):

display on PC Browser(Win10,Chrome Version 54.0.2840.59 m)

@zyxins unfortunately I am still having issues reproducing this issue. If you try on the Android emulator do the lines show up?
The following is the display of the screenshots on the simulator:

I have the same problem,when set the whole app in ios’s style, all border is none
on the android
Encountered the same problem rc.3 seeking answers
This is because $hairlines-width is set to less than 1 px. This variable is used in iOS-only theming to set a border to a true "1 device pixel". This article has a nice summary of the retina display hairline problem.
Later versions of Chrome (and the Android WebView) correctly round up to 1px, while earlier versions round down to 0px. I believe Android 6+ will show the hairline borders correctly, while 5- will not. Here is the actual bug ticket:
https://bugs.chromium.org/p/chromium/issues/detail?id=229428
The crux of your problem is that you've set the theming to iOS, which is using that less than 1px border on Android. You could fix this with CSS, either by overriding the variable:
$hairlines-width: 1px;
@import 'ionic.theme.default';
Easy and simple, but the downside is that hairlines will look larger on retina iOS devices. Alternatively, you can go through all the places $hairlines-width is being used and force it to 1px on Android only.
.md {
.list-header-ios,
// ... and a whole lot of other places
// ...
.searchbar-ios {
border-width: 1px !important;
}
}
@import 'ionic.theme.default';
Pros: iOS and Android now look correct. Cons: you've got to search and override all those places, and you have to update and maintain any new iOS features that use the $hairlines-width variable.
My personal opinion would be to use the first option, deal with the slightly larger lines on iOS, and remove it later once you drop support for Android 5-.
Hello all! Is this still an issue? I cannot reproduce on a Moto G running Android 4.4.4.
Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.