chore: cleanup

This commit is contained in:
Nathan Walker
2020-07-04 01:12:55 -07:00
parent 9341cd9554
commit 1525c89733
274 changed files with 1755 additions and 2733 deletions

View File

@@ -8,8 +8,9 @@ import { TextTransform } from "../text-base";
import * as application from "../../application";
import { ImageSource } from "../../image-source";
import { ad, isFontIconURI, layout, RESOURCE_PREFIX } from "../../utils/utils";
import { Color, CSSType } from "../core/view";
import { Frame, View } from "../frame";
import { CSSType, View } from "../core/view";
import { Color } from "../../color";
import { Frame } from "../frame";
import { Font } from "../styling/font";
import {
getIconSpecSize, itemsProperty, selectedIndexProperty, TabNavigationBase, tabStripProperty
@@ -17,7 +18,7 @@ import {
import { getTransformedText } from "../text-base";
// TODO: Impl trace
// import { isEnabled as traceEnabled, write as traceWrite } from "../../../trace";
// import { Trace } from "../../../trace";
const PRIMARY_COLOR = "colorPrimary";
const DEFAULT_ELEVATION = 8;
@@ -278,8 +279,8 @@ export class BottomNavigation extends TabNavigationBase {
public createNativeView() {
initializeNativeClasses();
// if (traceEnabled()) {
// traceWrite("BottomNavigation._createUI(" + this + ");", traceCategory);
// if (Trace.isEnabled()) {
// Trace.write("BottomNavigation._createUI(" + this + ");", traceCategory);
// }
const context: android.content.Context = this._context;
@@ -848,8 +849,8 @@ export class BottomNavigation extends TabNavigationBase {
[selectedIndexProperty.setNative](value: number) {
// const smoothScroll = false;
// if (traceEnabled()) {
// traceWrite("TabView this._viewPager.setCurrentItem(" + value + ", " + smoothScroll + ");", traceCategory);
// if (Trace.isEnabled()) {
// Trace.write("TabView this._viewPager.setCurrentItem(" + value + ", " + smoothScroll + ");", traceCategory);
// }
if (this.tabStrip) {

View File

@@ -1,12 +1,8 @@
/**
* Contains the BottomNavigation class, which represents a tab navigation widget with static tabs at the bottom.
* @module "ui/tab-navigation/bottom-navigation"
*/ /** */
import { TabNavigationBase } from "../tab-navigation-base/tab-navigation-base";
import { TabNavigationBase } from "../tab-navigation-base/tab-navigation-base";
import { TabContentItem } from "../tab-navigation-base/tab-content-item";
import { TabStrip } from "../tab-navigation-base/tab-strip";
import { Property, CoercibleProperty, EventData } from "../core/view";
import { Property, CoercibleProperty } from "../core/properties";
import { EventData } from "../../data/observable";
/**
* Defines the data for the TabView.selectedIndexChanged event.

View File

@@ -110,8 +110,8 @@ class UITabBarControllerDelegateImpl extends NSObject implements UITabBarControl
public tabBarControllerShouldSelectViewController(tabBarController: UITabBarController, viewController: UIViewController): boolean {
// TODO
// if (traceEnabled()) {
// traceWrite("TabView.delegate.SHOULD_select(" + tabBarController + ", " + viewController + ");", traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write("TabView.delegate.SHOULD_select(" + tabBarController + ", " + viewController + ");", Trace.categories.Debug);
// }
let owner = this._owner.get();
@@ -145,8 +145,8 @@ class UITabBarControllerDelegateImpl extends NSObject implements UITabBarControl
public tabBarControllerDidSelectViewController(tabBarController: UITabBarController, viewController: UIViewController): void {
// TODO
// if (traceEnabled()) {
// traceWrite("TabView.delegate.DID_select(" + tabBarController + ", " + viewController + ");", traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write("TabView.delegate.DID_select(" + tabBarController + ", " + viewController + ");", Trace.categories.Debug);
// }
const owner = this._owner.get();
@@ -172,8 +172,8 @@ class UINavigationControllerDelegateImpl extends NSObject implements UINavigatio
navigationControllerWillShowViewControllerAnimated(navigationController: UINavigationController, viewController: UIViewController, animated: boolean): void {
// TODO
// if (traceEnabled()) {
// traceWrite("TabView.moreNavigationController.WILL_show(" + navigationController + ", " + viewController + ", " + animated + ");", traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write("TabView.moreNavigationController.WILL_show(" + navigationController + ", " + viewController + ", " + animated + ");", Trace.categories.Debug);
// }
let owner = this._owner.get();
@@ -187,8 +187,8 @@ class UINavigationControllerDelegateImpl extends NSObject implements UINavigatio
navigationControllerDidShowViewControllerAnimated(navigationController: UINavigationController, viewController: UIViewController, animated: boolean): void {
// TODO
// if (traceEnabled()) {
// traceWrite("TabView.moreNavigationController.DID_show(" + navigationController + ", " + viewController + ", " + animated + ");", traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write("TabView.moreNavigationController.DID_show(" + navigationController + ", " + viewController + ", " + animated + ");", Trace.categories.Debug);
// }
// We don't need Edit button in More screen.
navigationController.navigationBar.topItem.rightBarButtonItem = null;
@@ -454,15 +454,15 @@ export class BottomNavigation extends TabNavigationBase {
public _onViewControllerShown(viewController: UIViewController) {
// This method could be called with the moreNavigationController or its list controller, so we have to check.
// TODO
// if (traceEnabled()) {
// traceWrite("TabView._onViewControllerShown(" + viewController + ");", traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write("TabView._onViewControllerShown(" + viewController + ");", Trace.categories.Debug);
// }
if (this._ios.viewControllers && this._ios.viewControllers.containsObject(viewController)) {
this.selectedIndex = this._ios.viewControllers.indexOfObject(viewController);
} else {
// TODO
// if (traceEnabled()) {
// traceWrite("TabView._onViewControllerShown: viewController is not one of our viewControllers", traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write("TabView._onViewControllerShown: viewController is not one of our viewControllers", Trace.categories.Debug);
// }
}
}
@@ -470,8 +470,8 @@ export class BottomNavigation extends TabNavigationBase {
private _actionBarHiddenByTabView: boolean;
public _handleTwoNavigationBars(backToMoreWillBeVisible: boolean) {
// TODO
// if (traceEnabled()) {
// traceWrite(`TabView._handleTwoNavigationBars(backToMoreWillBeVisible: ${backToMoreWillBeVisible})`, traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write(`TabView._handleTwoNavigationBars(backToMoreWillBeVisible: ${backToMoreWillBeVisible})`, Trace.categories.Debug);
// }
// The "< Back" and "< More" navigation bars should not be visible simultaneously.
@@ -489,8 +489,8 @@ export class BottomNavigation extends TabNavigationBase {
this._actionBarHiddenByTabView = true;
// TODO
// if (traceEnabled()) {
// traceWrite(`TabView hid action bar`, traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write(`TabView hid action bar`, Trace.categories.Debug);
// }
return;
}
@@ -502,8 +502,8 @@ export class BottomNavigation extends TabNavigationBase {
this._actionBarHiddenByTabView = undefined;
// TODO
// if (traceEnabled()) {
// traceWrite(`TabView restored action bar`, traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write(`TabView restored action bar`, Trace.categories.Debug);
// }
return;
}
@@ -729,8 +729,8 @@ export class BottomNavigation extends TabNavigationBase {
[selectedIndexProperty.setNative](value: number) {
// TODO
// if (traceEnabled()) {
// traceWrite("TabView._onSelectedIndexPropertyChangedSetNativeValue(" + value + ")", traceCategories.Debug);
// if (Trace.isEnabled()) {
// Trace.write("TabView._onSelectedIndexPropertyChangedSetNativeValue(" + value + ")", Trace.categories.Debug);
// }
if (value > -1) {