Skip to content

ActionBar Title not displaying [Android] #725

Closed

Description

@triniwiz

After upgrading to v 1.5.0 the action bar title does not show on android everything works fine on iOS

{
  "description": "",
  "license": "",
  "readme": "",
  "repository": "",
  "nativescript": {
    "id": "",
    "tns-android": {
      "version": "2.5.0"
    },
    "tns-ios": {
      "version": "2.5.0"
    }
  },
  "dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@angular/router": "4.0.0",
    "@ngx-translate/core": "^6.0.1",
    "email-validator": "^1.0.7",
    "moment": "^2.15.1",
    "nativescript-accordion": "~3.0.0",
    "nativescript-angular": "1.5.0",
    "nativescript-audio": "latest",
    "nativescript-checkbox": "^1.2.6",
    "nativescript-couchbase": "^1.0.11",
    "nativescript-email": "^1.3.4",
    "nativescript-fresco": "^1.0.14",
    "nativescript-html-handler": "file:nativescript-html-handler",
    "nativescript-iqkeyboardmanager": "^1.0.1",
    "nativescript-local-notifications": "^1.1.8",
    "nativescript-pager": "^2.2.2",
    "nativescript-permissions": "^1.2.2",
    "nativescript-telerik-ui": "^1.6.1",
    "nativescript-toasty": "^1.1.1",
    "nativescript-tooltip": "^2.1.0",
    "nativescript-zip": "^1.0.0",
    "reflect-metadata": "^0.1.8",
    "rxjs": "~5.2.0",
    "tns-core-modules": "2.5.0",
    "tns-platform-declarations": "^2.5.0",
    "zone.js": "~0.8.4"
  },
  "devDependencies": {
    "@angular/compiler-cli": "4.0.0",
    "@ngtools/webpack": "1.3.0",
    "babel-traverse": "6.15.0",
    "babel-types": "6.15.0",
    "babylon": "6.11.2",
    "copy-webpack-plugin": "~3.0.1",
    "extract-text-webpack-plugin": "~2.0.0",
    "htmlparser2": "~3.9.2",
    "lazy": "1.0.11",
    "nativescript-css-loader": "~0.26.0",
    "nativescript-dev-android-snapshot": "0.0.8",
    "nativescript-dev-sass": "^0.4.1",
    "nativescript-dev-typescript": "^0.3.7",
    "nativescript-dev-webpack": "^0.3.6",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~1.6.0",
    "typescript": "~2.1.0",
    "webpack": "2.2.0",
    "webpack-sources": "~0.1.3",
    "worker-loader": "git+https://github.com/triniwiz/worker-loader.git"
  },
  "scripts": {
    "rebuild": "rm -rf platforms/ && rm -rf node_modules && npm i",
    "ns-bundle": "ns-bundle",
    "start-android-bundle": "npm run ns-bundle --android --start-app",
    "start-ios-bundle": "npm run ns-bundle --ios --start-app",
    "build-android-bundle": "npm run ns-bundle --android --build-app",
    "build-ios-bundle": "npm run ns-bundle --ios --build-app"
  }
}

Activity

  1. sis0k0 commented on Mar 29, 2017

    @sis0k0
    Contributor

    Hey, @triniwiz!

    We confirmed that the ActionBar title fails to render sometimes. Can you share your case so we make sure we'll cover it, too?

  2. triniwiz commented on Mar 29, 2017

    @triniwiz
    MemberAuthor

    @sis0k0 nice i thought it was just me not sure how much my info would help but the app currently has about 25 pages each updating their titles using ngx-translate and icons the thing is the icons show fine. Another thing i noticed is the way *ngIf worked with the ActionBar changed in v4 because before i could of done something like the following

    <ActionBar title="Home">
        <NavigationButton icon="res://ic_arrow_back_white_24dp" (tap)="routerExtensions.back()"></NavigationButton>
        <ActionItem *ngIf="isIOS" (tap)="routerExtensions.back()" ios.position="left" icon="res://ic_chevron_left_white_36pt"></ActionItem>
    
        <ActionItem *ngIf="isAndroid" (tap)="share()">
            <Button text="&#xE80D;" class="material-icons action-bar-item"></Button>
        </ActionItem>
        <ActionItem *ngIf="isIOS" (tap)="share()" ios.systemIcon="9" ios.position="right"></ActionItem>
    </ActionBar>

    now nothing shows so i had to use a directive

  3. added 6 commits that reference this issue on Mar 29, 2017
    5986845
    217031d
    b707851
    f823876
    2147858
    be93db6
  4. sis0k0 commented on Mar 30, 2017

    @sis0k0
    Contributor

    Fixed with 1.5.1 patch.

  5. added a commit that references this issue on Mar 30, 2017
    0490605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions