chore: addimg tabbable component android

This commit is contained in:
Vasko
2020-03-31 20:51:30 +03:00
parent 35bed137f4
commit ecb844f9f2
18 changed files with 757 additions and 952 deletions

View File

@@ -32,7 +32,7 @@ import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.TextView;
public class BottomNavigationBar extends LinearLayout {
public class BottomNavigationBar extends LinearLayout implements TabbableBar {
/**
* Allows complete control over the colors drawn in the tab layout. Set with
* {@link #setCustomTabColorizer(TabColorizer)}.

View File

@@ -0,0 +1,33 @@
/*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.nativescript.widgets;
import android.widget.LinearLayout;
import android.widget.TextView;
public interface TabbableBar {
void setTabTextColor(int color);
int getTabTextColor();
void setSelectedTabTextColor(int color);
int getSelectedTabTextColor();
void setTabTextFontSize(float fontSize);
float getTabTextFontSize();
void updateItemAt(int position, TabItemSpec tabItem);
TextView getTextViewForItemAt(int index);
LinearLayout getViewForItemAt(int index);
int getItemCount();
}

View File

@@ -48,7 +48,7 @@ import android.widget.TextView;
* complete control over which color is used for any individual position.
* <p>
*/
public class TabsBar extends HorizontalScrollView {
public class TabsBar extends HorizontalScrollView implements TabbableBar {
/**
* Allows complete control over the colors drawn in the tab layout. Set with
* {@link #setCustomTabColorizer(TabColorizer)}.