Skip to content

Commit

Permalink
Refactored the project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
saulmm committed Nov 3, 2014
1 parent bafdbe1 commit 3946376
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
package com.saulmm.material.activities;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.app.Activity;
import android.app.ActivityOptions;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.transition.Slide;
import android.transition.Transition;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.Pair;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewAnimationUtils;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.Switch;

import com.saulmm.material.R;
import com.saulmm.material.Utils;
import com.saulmm.material.utils.Utils;

public class ColorActivity extends Activity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.Toolbar;

import com.saulmm.material.R;
import com.saulmm.material.slidingtabs.adapter.DialerAdapter;
import com.saulmm.material.slidingtabs.adapter.SamplePagerAdapter;
import com.saulmm.material.slidingtabs.views.SlidingTabLayout;
import com.saulmm.material.views.adapters.DialerPagerAdapter;
import com.saulmm.material.views.widgets.SlidingTabLayout;

public class DialerSampleActivity extends ActionBarActivity {

Expand All @@ -50,7 +48,7 @@ private void configureToolbar() {
private void configurePager() {

ViewPager mViewPager = (ViewPager) findViewById(R.id.activity_dialer_pager);
mViewPager.setAdapter(new DialerAdapter(this));
mViewPager.setAdapter(new DialerPagerAdapter(this));

SlidingTabLayout mSlidingTabLayout = (SlidingTabLayout) findViewById(R.id.activity_dialer_tabs);
mSlidingTabLayout.setViewPager(mViewPager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import android.view.View;

import com.saulmm.material.R;
import com.saulmm.material.slidingtabs.fragments.SlidingTabFragment;
import com.saulmm.material.fragments.SlidingTabFragment;

public class SlidingActivity extends ActionBarActivity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import android.view.View;

import com.saulmm.material.R;
import com.saulmm.material.Utils;
import com.saulmm.material.utils.Utils;

public class TransitionFirstActivity extends Activity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import android.widget.LinearLayout;

import com.saulmm.material.R;
import com.saulmm.material.Utils;
import com.saulmm.material.utils.Utils;

public class TransitionSecondActivity extends Activity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@
* limitations under the License.
*/

package com.saulmm.material.slidingtabs.fragments;
package com.saulmm.material.fragments;


import android.app.Fragment;
import android.os.Bundle;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.saulmm.material.R;
import com.saulmm.material.slidingtabs.adapter.SamplePagerAdapter;
import com.saulmm.material.slidingtabs.views.SlidingTabLayout;
import com.saulmm.material.views.adapters.SamplePagerAdapter;
import com.saulmm.material.views.widgets.SlidingTabLayout;


public class SlidingTabFragment extends Fragment {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.saulmm.material;
package com.saulmm.material.utils;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
Expand All @@ -13,6 +13,8 @@
import android.view.Window;
import android.view.animation.PathInterpolator;

import com.saulmm.material.R;

public class Utils {

public static void configureWindowEnterExitExplodeTransition(Window w) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.saulmm.material.slidingtabs.adapter;
package com.saulmm.material.views.adapters;

import android.content.Context;
import android.support.v4.view.PagerAdapter;
Expand All @@ -9,12 +9,12 @@
import com.saulmm.material.R;

@SuppressWarnings("FieldCanBeLocal")
public class DialerAdapter extends PagerAdapter {
public class DialerPagerAdapter extends PagerAdapter {

private final String [] TITLES = {"SPEED DIAL", "RECENTS", "CONTACTS"};
private Context context;

public DialerAdapter(Context context) {
public DialerPagerAdapter(Context context) {
this.context = context;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.saulmm.material.slidingtabs.adapter;
package com.saulmm.material.views.adapters;

import android.content.Context;
import android.support.v4.view.PagerAdapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.saulmm.material.slidingtabs.views;
package com.saulmm.material.views.widgets;

import android.content.Context;
import android.graphics.Typeface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.saulmm.material.slidingtabs.views;
package com.saulmm.material.views.widgets;

import android.R;
import android.content.Context;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_dialer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:background="#FFF"
android:orientation="vertical">

<com.saulmm.material.slidingtabs.views.SlidingTabLayout
<com.saulmm.material.views.widgets.SlidingTabLayout
android:id="@+id/activity_dialer_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_sliding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:background="#FFF"
android:orientation="vertical">

<com.saulmm.material.slidingtabs.views.SlidingTabLayout
<com.saulmm.material.views.widgets.SlidingTabLayout
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down

0 comments on commit 3946376

Please sign in to comment.