Skip to content

Commit

Permalink
A new version with
Browse files Browse the repository at this point in the history
bug fix
new features
and fun
  • Loading branch information
gilgoldzweig committed Sep 8, 2016
1 parent e099f53 commit 5111bfc
Show file tree
Hide file tree
Showing 22 changed files with 1,650 additions and 1,042 deletions.
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

11 changes: 3 additions & 8 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

18 changes: 17 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android {

defaultConfig {
applicationId "goldzweigapps.easytabs"
minSdkVersion 16
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
Expand All @@ -26,4 +26,7 @@ dependencies {
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.android.support:design:23.3.0'
compile project(':tabs')
compile 'com.android.support:leanback-v17:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
}
67 changes: 33 additions & 34 deletions app/src/main/java/goldzweigapps/easytabs/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,59 @@

import android.graphics.Typeface;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

import butterknife.Bind;
import butterknife.ButterKnife;
import goldzweigapps.tabs.Builder.EasyTabsBuilder;
import goldzweigapps.tabs.Builder.TabItem;
import goldzweigapps.tabs.EasyTabsColors;
import goldzweigapps.tabs.transforms.AccordionTransformer;
import goldzweigapps.tabs.transforms.CubeInTransformer;
import goldzweigapps.tabs.transforms.CubeOutTransformer;
import goldzweigapps.tabs.Interface.TabsListener;
import goldzweigapps.tabs.transforms.EasyTabletTransformer;

public class MainActivity extends AppCompatActivity {
EasyTabsBuilder builder;
EasyTabsColors colors;
@Bind(R.id.pager)
ViewPager pager;
@Bind(R.id.tabs)
TabLayout tabs;
@Bind(R.id.pager)
ViewPager pager;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
Typeface selected;
selected = Typeface.createFromAsset(getAssets(), "fonts/bubble.ttf");
colors = new EasyTabsColors();
builder = new EasyTabsBuilder(this, tabs, pager)
.addTabs(false,
new TabItem(new frag1(), "number 1"),
new TabItem(new frag2(), "number 2"),
new TabItem(new frag3(), "number 3"),
new TabItem(new frag4(), "number 4"),
new TabItem(new frag1(), "number 1"),

EasyTabsBuilder.init(this,tabs,pager).addTabs( //this = AppCompactActivity, tabs = TabsLayout, pager = ViewPager
new TabItem(new frag1(), "number 1"), // Add four Tab items with fragment and title
new TabItem(new frag2(), "number 2"),
new TabItem(new frag3(), "number 3"),
new TabItem(new frag4(), "number 4"),
new TabItem(new frag1(), "number 5")
)
.setBackgroundColor(colors.RoyalBlue)
.setIndicatorColor(colors.White)

.setTextColors(colors.White, colors.DarkSlateBlue)
.addIcons(R.drawable.ic_person_white_36dp,
R.drawable.ic_photo_camera_white_36dp,
R.drawable.ic_favorite_white_36dp,
R.drawable.ic_help_white_36dp,
R.drawable.ic_person_white_36dp)
.setTransformation(true, new CubeOutTransformer())
.setTabLayoutScrolable(false)
.setTypeface(selected)
.setToRTL(false)
.withIconFading(true);
new TabItem(new frag4(), "number 4"))
.HideTitle(false)
.setBackgroundColor(EasyTabsColors.White)
.setIndicatorColor(EasyTabsColors.Black)
.setTextColors(EasyTabsColors.Black, EasyTabsColors.RoyalBlue) //Setting two colors selected one and unselected one
.addIcons(
R.drawable.ic_person_white_36dp,
R.drawable.ic_photo_camera_white_36dp,
R.drawable.ic_favorite_white_36dp,
R.drawable.ic_help_white_36dp) //Adding four icons
.setTransformation(true, new EasyTabletTransformer())
.setTabLayoutScrollable(false)
.setCustomTypeface(Typeface.createFromAsset(getAssets(), "fonts/bubble.ttf"))
.setRTLPosition(true)
.withListener(new TabsListener() {

@Override
public void onScreenPosition(int position) {
Log.d("tag", String.valueOf(position));
}
})
.setIconFading(true)
.Build();
}

}
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_favorite_white_36dp.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="36dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="36dp">
<path android:fillColor="#FFFFFF" android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/>
<path android:fillColor="@color/colorPrimary" android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_help_white_36dp.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="36dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="36dp">
<path android:fillColor="#FFFFFF" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z"/>
<path android:fillColor="@color/colorPrimary" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_person_white_36dp.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="36dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="36dp">
<path android:fillColor="#FFFFFF" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
<path android:fillColor="@color/colorPrimary" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_photo_camera_white_36dp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="36dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="36dp">
<path android:fillColor="#FFFFFF" android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path android:fillColor="#FFFFFF" android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
<path android:fillColor="@color/colorPrimary" android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path android:fillColor="@color/colorPrimary" android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
</vector>
44 changes: 38 additions & 6 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="goldzweigapps.easytabs.MainActivity">
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="goldzweigapps.easytabs.MainActivity"
xmlns:android="http://schemas.android.com/apk/res/android">

<android.support.v7.widget.Toolbar
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="?attr/actionBarTheme"
android:minHeight="?attr/actionBarSize"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:elevation="0dp" />


<android.support.design.widget.TabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tabs"
android:background="@color/colorPrimary"/>
android:background="@color/Gold"
android:layout_below="@+id/toolbar"
android:layout_alignParentStart="true">


</android.support.design.widget.TabLayout>

<android.support.design.widget.FloatingActionButton
android:src="@drawable/lb_ic_replay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
app:fabSize="normal"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:id="@+id/floatingActionButton2"
android:layout_margin="14dp"
fabSize="normal" />

<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/pager"
android:layout_below="@+id/tabs" />
android:layout_below="@+id/tabs"
android:layout_alignParentStart="true" />

</RelativeLayout>
8 changes: 1 addition & 7 deletions app/src/main/res/layout/frag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,5 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"
android:textSize="40sp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />

</RelativeLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.android.tools.build:gradle:2.2.0-rc1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Thu Sep 08 13:12:30 IDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
14 changes: 8 additions & 6 deletions tabs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apply plugin: 'maven'
siteUrl = 'https://github.com/gilgoldzweig/EasyTabs'
gitUrl = 'https://github.com/gilgoldzweig/EasyTabs.git'

libraryVersion = '0.9.4'
libraryVersion = '1.0.1'

developerId = 'gil'
developerName = 'Gil Goldzweig Goldbaum'
Expand All @@ -25,14 +25,14 @@ apply plugin: 'maven'
}

android {
compileSdkVersion 23
compileSdkVersion 24
buildToolsVersion "23.0.3"

defaultConfig {
minSdkVersion 16
targetSdkVersion 23
targetSdkVersion 24
versionCode 1
versionName "1.0"
versionName "1.0.1"
}
buildTypes {
release {
Expand All @@ -45,10 +45,12 @@ android {


dependencies {
compile 'com.android.support:appcompat-v7:23.+'

compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:appcompat-v7:24.2.0'


}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
Expand Down
Loading

0 comments on commit 5111bfc

Please sign in to comment.