mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: addimg tabbable component android
This commit is contained in:
@@ -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)}.
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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)}.
|
||||
|
||||
Reference in New Issue
Block a user