-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Data binding fixes clean (#712) * Fix Bottom Bar issues with Android Data Binding * keep .idea * travis changes * Fix for shadow (#716) * - Removing the view for API 21 - Adding a negative margin for API 20 or less so that the content is overlapped with the shadow - Fix the annotation for the MiscUtils * - Removing the view for API 21 - Adding a negative margin for API 20 or less so that the content is overlapped with the shadow - Fix the annotation for the MiscUtils * - Removing the view for API 21 - Adding a negative margin for API 20 or less so that the content is overlapped with the shadow - Fix the annotation for the MiscUtils * SelectableItemBackground Ripple! (#713) * Add selectableItemBackground programmatically which shows user touch response with either ripple or slight change of colour if below lollipop. * Remove style in tablet mode which makes ripple go out of bounds. Without it ripple is contained within its view. * Remove unnecessary local reference. * Added getTypedValue and getDrawableRes methods in MiscUtils and changed to selectableItemBackgroundBorderless. * Change color to resId. * Fix for wrong size in tabs - Setting the modified LayoutParams so that the views are changed (#719) * Tabs without titles (#717) * Update CHANGELOG.md * Update README.md * Update README.md * Basic support for tabs that have no title, only icons. * Reverted debug code. * Made sure that icon-only tabs throw an exception if they don't have icons. * There's no need to set visibility to the title, as it's already visible. * Added a sample for the icons only mode. * Made the titleless mode combined with shifting mode work. * Removed the eight dp padding from XML layout, since that offsets titleless tab icons from the center & isn't needed anyway since it's set dynamically. * Added some zoom to active tab icons that are both shifting and titleless. * Cleared up the select & unselect methods. * Modified the color changing tabs sample height, so it looks less crammed and more like the design specs. * Show & Hide methods when on shy mode. (#722) * Added methods for showing / hiding the BottomBar when on shy mode. * Better naming. * Refactored the hide / show methods to a separate ShySettings class, since they were only related for a shy BottomBar. * Made getting shy settings not throw an exception when the bottombar isn't shy, but have a log warning instead. * Made it possible to have individual titleless tabs. (#726) * Feature/optional long press toasts (#714) * Update CHANGELOG.md * Update README.md * Update README.md * Made it possible to control whether or not the Toasts are shown when long pressing tabs. * Updated changelog. * v2.3.0 (#732) * Update CHANGELOG.md * Update README.md * Update README.md * Bumped up version number. * Updated Changelog & Readme
- Loading branch information
Showing
32 changed files
with
459 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,4 @@ captures/ | |
.idea/libraries | ||
|
||
# Keystore files | ||
*.jks | ||
*.jks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
app/src/main/java/com/example/bottombar/sample/IconsOnlyActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.example.bottombar.sample; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.support.annotation.IdRes; | ||
import android.support.annotation.Nullable; | ||
import android.widget.TextView; | ||
import android.widget.Toast; | ||
|
||
import com.roughike.bottombar.BottomBar; | ||
import com.roughike.bottombar.OnTabReselectListener; | ||
import com.roughike.bottombar.OnTabSelectListener; | ||
|
||
public class IconsOnlyActivity extends Activity { | ||
private TextView messageView; | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_icons_only); | ||
|
||
messageView = (TextView) findViewById(R.id.messageView); | ||
|
||
BottomBar bottomBar = (BottomBar) findViewById(R.id.bottomBar); | ||
bottomBar.setOnTabSelectListener(new OnTabSelectListener() { | ||
@Override | ||
public void onTabSelected(@IdRes int tabId) { | ||
messageView.setText(TabMessage.get(tabId, false)); | ||
} | ||
}); | ||
|
||
bottomBar.setOnTabReselectListener(new OnTabReselectListener() { | ||
@Override | ||
public void onTabReSelected(@IdRes int tabId) { | ||
Toast.makeText(getApplicationContext(), TabMessage.get(tabId, true), Toast.LENGTH_LONG).show(); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<TextView | ||
android:id="@+id/messageView" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_above="@+id/bottomBar" | ||
android:gravity="center" | ||
android:text="Hi mom!" /> | ||
|
||
<com.roughike.bottombar.BottomBar | ||
android:id="@+id/bottomBar" | ||
android:layout_width="match_parent" | ||
android:layout_height="60dp" | ||
android:layout_alignParentBottom="true" | ||
app:bb_tabXmlResource="@xml/bottombar_tabs_five" | ||
app:bb_behavior="iconsOnly" /> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.