SuperMuMu's ui is a Java library with custom view components.
* Provide models to convenient/powerful and easy to integrate on your code.
* To use SuperMuMu-UI in Android
dependencies {
compile 'com.supermumu:ui:1.0.6'
}
Use default style or define customize style via yourself.
In Java:
SingleSelectBar bar = new SingleSelectBar(context);
bar.setSelectedColor(Color.RED);
bar.setUnselectedColor(Color.BLACK);
bar.setTabTextAppearance(R.style.text_appearance);
bar.setTabStrokeWidth(4);
bar.setPressedEffectStyle(SingleSelectBar.DARK);
In Xml:
<com.supermumu.ui.widget.SingleSelectBoard
android:layout_width="0dp"
android:layout_height="wrap_content"
app:uiColorSelected="@color/colorPrimary"
app:uiColorUnselected="@android:color/white"
app:uiPressedEffectStyle="none"
app:uiRoundCornerRadius="180px"
app:uiStrokeWidth="3dp"/>
Sets display list of CharSequence(max=5)
In Java:
SingleSelectBar bar = new SingleSelectBoard(context);
...
bar.setTabs(list);
or
bar.setTabs(list, 3);
Listen all select callback
In Java:
SingleSelectBar bar = new SingleSelectBoard(context);
...
bar.setOnTabSelectListener(new SingleSelectBar.OnTabSelectListener() {
@Override
public void onSelect(int position, View view) {
// do something...
}
});
SuperMuMu is released under the Apache 2.0 license.
Copyright 2017 by SuperMuMu
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.