Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionBar Title not displaying [Android] #725

Closed
triniwiz opened this issue Mar 28, 2017 · 3 comments
Closed

ActionBar Title not displaying [Android] #725

triniwiz opened this issue Mar 28, 2017 · 3 comments
Labels

Comments

@triniwiz
Copy link
Member

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"
  }
}
@sis0k0 sis0k0 added the bug label Mar 28, 2017
@sis0k0
Copy link
Contributor

sis0k0 commented Mar 29, 2017

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?

@triniwiz
Copy link
Member Author

@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

sis0k0 added a commit that referenced this issue Mar 29, 2017
anchors for the elements added by structural directive (*ngIf, *ngFor, etc.)

closes #725
sis0k0 added a commit that referenced this issue Mar 29, 2017
anchors for the elements added by structural directive (*ngIf, *ngFor, etc.)

closes #725
sis0k0 added a commit that referenced this issue Mar 29, 2017
\#comment nodes should be added as views to 'actionBar' since they are anchors for the elements added by structural directive (*ngIf, *ngFor, etc.)

closes #725
sis0k0 added a commit that referenced this issue Mar 29, 2017
#comment nodes should be added as views to 'actionBar' since they are anchors for the elements added by structural directive (*ngIf, *ngFor, etc.)

closes #725

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Wed Mar 29 17:49:06 2017 +0300
#
# On branch svlaeva/fix-action-bar
# Your branch is up-to-date with 'origin/svlaeva/fix-action-bar'.
#
# Changes to be committed:
#	modified:   nativescript-angular/directives/action-bar.ts
#
# Untracked files:
#	nativescript-angular/yarn.lock
#	ng-sample/yarn.lock
#

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Wed Mar 29 17:49:06 2017 +0300
#
# On branch svlaeva/fix-action-bar
# Your branch and 'origin/svlaeva/fix-action-bar' have diverged,
# and have 1 and 1 different commits each, respectively.
#   (use "git pull" to merge the remote branch into yours)
#
# Changes to be committed:
#	modified:   nativescript-angular/directives/action-bar.ts
#
# Untracked files:
#	nativescript-angular/yarn.lock
#	ng-sample/yarn.lock
#
sis0k0 added a commit that referenced this issue Mar 29, 2017
#comment nodes should be added as views to 'actionBar' since they are anchors for the elements added by structural directive (*ngIf, *ngFor, etc.)

closes #725
sis0k0 added a commit that referenced this issue Mar 29, 2017
#comment nodes should be added as views to 'actionBar' since they are anchors for the elements added by structural directive (*ngIf, *ngFor, etc.)

closes #725
@sis0k0
Copy link
Contributor

sis0k0 commented Mar 30, 2017

Fixed with 1.5.1 patch.

@sis0k0 sis0k0 closed this as completed Mar 30, 2017
sis0k0 added a commit that referenced this issue Mar 30, 2017
#comment nodes should be added as views to 'actionBar' since they are anchors for the elements added by structural directive (*ngIf, *ngFor, etc.)

closes #725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants