Skip to content

Commit

Permalink
Paket isimleri duzenlendi
Browse files Browse the repository at this point in the history
Kodlarin formati duzenlendi ve gereksiz importlar silindi
  • Loading branch information
AbdullahSa committed Feb 26, 2016
1 parent 282cd6f commit caee1e0
Show file tree
Hide file tree
Showing 20 changed files with 75 additions and 81 deletions.
22 changes: 11 additions & 11 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<uses-permission android:name="com.turkcell.curiosample.permission.C2D_MESSAGE" />

<application
android:name=".Configuration.AppController"
android:name=".configuration.AppController"
android:allowBackup="true"
android:icon="@mipmap/ic_logo"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:screenOrientation="portrait"
android:name=".Activity.MainActivity"
android:name=".activity.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -30,42 +30,42 @@
</activity>
<activity
android:screenOrientation="portrait"
android:name=".Activity.EgitimBaslikActivity"
android:name=".activity.EgitimBaslikActivity"
android:label="Eğitim" >
</activity>
<activity
android:screenOrientation="portrait"
android:name=".Activity.EgitimIcerikActivity"
android:name=".activity.EgitimIcerikActivity"
android:label="Eğitim İçerik Sayfası" >
</activity>
<activity
android:screenOrientation="portrait"
android:name=".Activity.ProfilActivity"
android:name=".activity.ProfilActivity"
android:label="Profil" >
</activity>
<activity
android:screenOrientation="portrait"
android:name=".Activity.AramaActivity"
android:name=".activity.AramaActivity"
android:label="@string/title_activity_arama" >
</activity>
<activity
android:screenOrientation="portrait"
android:name=".Activity.YorumActivity"
android:name=".activity.YorumActivity"
android:label="@string/title_activity_yorum" >
</activity>
<activity
android:screenOrientation="portrait"
android:name=".Activity.EtkinlikIcerikActivity"
android:name=".activity.EtkinlikIcerikActivity"
android:label="@string/title_activity_etkinlik_icerik" >
</activity>
<activity
android:screenOrientation="portrait"
android:name=".Activity.BlogIcerikAcitivity"
android:name=".activity.BlogIcerikAcitivity"
android:label="@string/title_activity_blog_icerik_acitivity" >
</activity>

<receiver
android:name=".Service.PushNotificationBroadcastReceiver"
android:name=".service.PushNotificationBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
Expand All @@ -74,7 +74,7 @@
</intent-filter>
</receiver>

<service android:name=".Service.PushNotificationIntentService" />
<service android:name=".service.PushNotificationIntentService" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.turkcell.gelecegiyazanlar.DesignEklentileri;
package com.turkcell.gelecegiyazanlar.dizayn;

import android.content.Context;
import android.graphics.Typeface;
Expand All @@ -21,16 +21,10 @@
public class SlidingTabLayout extends HorizontalScrollView {


public interface TabColorizer {

int getIndicatorColor(int position);

}

private static final int TITLE_OFFSET_DIPS = 24;
private static final int TAB_VIEW_PADDING_DIPS = 10;
private static final int TAB_VIEW_TEXT_SIZE_SP = 10;

private final SlidingTabStrip mTabStrip;
private int mTitleOffset;

private int mTabViewLayoutId;
Expand All @@ -41,8 +35,6 @@ public interface TabColorizer {
private SparseArray<String> mContentDescriptions = new SparseArray<String>();
private ViewPager.OnPageChangeListener mViewPagerPageChangeListener;

private final SlidingTabStrip mTabStrip;

public SlidingTabLayout(Context context) {
this(context, null);
}
Expand All @@ -67,7 +59,7 @@ public SlidingTabLayout(Context context, AttributeSet attrs, int defStyle) {

/**
* Set the custom {@link TabColorizer} to be used.
*
* <p>
* If you only require simple custmisation then you can use
* {@link #setSelectedIndicatorColors(int...)} to achieve
* similar effects.
Expand Down Expand Up @@ -103,14 +95,13 @@ public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
* Set the custom layout to be inflated for the tab views.
*
* @param layoutResId Layout id to be inflated
* @param textViewId id of the {@link TextView} in the inflated view
* @param textViewId id of the {@link TextView} in the inflated view
*/
public void setCustomTabView(int layoutResId, int textViewId) {
mTabViewLayoutId = layoutResId;
mTabViewTextViewId = textViewId;
}


public void setViewPager(ViewPager viewPager) {
mTabStrip.removeAllViews();

Expand Down Expand Up @@ -225,6 +216,12 @@ private void scrollToTab(int tabIndex, int positionOffset) {
}
}

public interface TabColorizer {

int getIndicatorColor(int position);

}

private class InternalViewPagerListener implements ViewPager.OnPageChangeListener {
private int mScrollState;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.turkcell.gelecegiyazanlar.DesignEklentileri;
package com.turkcell.gelecegiyazanlar.dizayn;

import android.content.Context;
import android.support.v4.view.ViewPager;
Expand All @@ -9,24 +9,18 @@
import android.widget.ImageView;
import android.widget.TextView;

import com.turkcell.gelecegiyazanlar.AdapterListener.ViewPagerAdapter;
import com.turkcell.gelecegiyazanlar.adapterlistener.ViewPagerAdapter;

/**
* Created by asus on 1.9.2015.
*/
public class SlidingTabLayoutIcon extends HorizontalScrollView {


public interface TabColorizer {

int getIndicatorColor(int position);

}

private static final int TITLE_OFFSET_DIPS = 5;
private static final int TAB_VIEW_PADDING_DIPS = 5;
private static final int TAB_VIEW_TEXT_SIZE_SP = 12;

private final SlidingTabStrip mTabStrip;
private int mTitleOffset;

private int mTabViewLayoutId;
Expand All @@ -37,8 +31,6 @@ public interface TabColorizer {
private SparseArray<String> mContentDescriptions = new SparseArray<String>();
private ViewPager.OnPageChangeListener mViewPagerPageChangeListener;

private final SlidingTabStrip mTabStrip;

public SlidingTabLayoutIcon(Context context) {
this(context, null);
}
Expand All @@ -63,7 +55,7 @@ public SlidingTabLayoutIcon(Context context, AttributeSet attrs, int defStyle) {

/**
* Set the custom {@link TabColorizer} to be used.
*
* <p>
* If you only require simple custmisation then you can use
* {@link #setSelectedIndicatorColors(int...)} to achieve
* similar effects.
Expand Down Expand Up @@ -97,14 +89,13 @@ public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
* Set the custom layout to be inflated for the tab views.
*
* @param layoutResId Layout id to be inflated
* @param textViewId id of the {@link TextView} in the inflated view
* @param textViewId id of the {@link TextView} in the inflated view
*/
public void setCustomTabView(int layoutResId, int textViewId) {
mTabViewLayoutId = layoutResId;
mTabViewTextViewId = textViewId;
}


public void setViewPager(ViewPager viewPager) {
mTabStrip.removeAllViews();

Expand All @@ -123,11 +114,11 @@ protected ImageView createDefaultImageView(Context context) {
ImageView imageView = new ImageView(context);

int padding = (int) (TAB_VIEW_PADDING_DIPS * getResources().getDisplayMetrics().density);
imageView.setPadding(padding-8, padding, padding-8, padding);
imageView.setPadding(padding - 8, padding, padding - 8, padding);


int width = (int) (getResources().getDisplayMetrics().widthPixels / mViewPager.getAdapter().getCount());
imageView.setMinimumWidth(width-120);
imageView.setMinimumWidth(width - 120);

return imageView;
}
Expand Down Expand Up @@ -207,6 +198,12 @@ private void scrollToTab(int tabIndex, int positionOffset) {
}
}

public interface TabColorizer {

int getIndicatorColor(int position);

}

private class InternalViewPagerListener implements ViewPager.OnPageChangeListener {
private int mScrollState;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.turkcell.gelecegiyazanlar.DesignEklentileri;
package com.turkcell.gelecegiyazanlar.dizayn;

import android.R;
import android.content.Context;
Expand All @@ -25,12 +25,10 @@ class SlidingTabStrip extends LinearLayout {
private final Paint mSelectedIndicatorPaint;

private final int mDefaultBottomBorderColor;

private final SimpleTabColorizer mDefaultTabColorizer;
private int mSelectedPosition;
private float mSelectionOffset;

private SlidingTabLayout.TabColorizer mCustomTabColorizer;
private final SimpleTabColorizer mDefaultTabColorizer;

SlidingTabStrip(Context context) {
this(context, null);
Expand All @@ -44,7 +42,7 @@ class SlidingTabStrip extends LinearLayout {

TypedValue outValue = new TypedValue();
context.getTheme().resolveAttribute(R.attr.colorForeground, outValue, true);
final int themeForegroundColor = outValue.data;
final int themeForegroundColor = outValue.data;

mDefaultBottomBorderColor = setColorAlpha(themeForegroundColor,
DEFAULT_BOTTOM_BORDER_COLOR_ALPHA);
Expand All @@ -60,6 +58,27 @@ class SlidingTabStrip extends LinearLayout {
mSelectedIndicatorPaint = new Paint();
}

/**
* Set the alpha value of the {@code color} to be the given {@code alpha} value.
*/
private static int setColorAlpha(int color, byte alpha) {
return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color));
}

/**
* Blend {@code color1} and {@code color2} using the given ratio.
*
* @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend,
* 0.0 will return {@code color2}.
*/
private static int blendColors(int color1, int color2, float ratio) {
final float inverseRation = 1f - ratio;
float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation);
float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation);
float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * inverseRation);
return Color.rgb((int) r, (int) g, (int) b);
}

void setCustomTabColorizer(SlidingTabLayout.TabColorizer customTabColorizer) {
mCustomTabColorizer = customTabColorizer;
invalidate();
Expand Down Expand Up @@ -117,27 +136,6 @@ protected void onDraw(Canvas canvas) {
canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint);
}

/**
* Set the alpha value of the {@code color} to be the given {@code alpha} value.
*/
private static int setColorAlpha(int color, byte alpha) {
return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color));
}

/**
* Blend {@code color1} and {@code color2} using the given ratio.
*
* @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend,
* 0.0 will return {@code color2}.
*/
private static int blendColors(int color1, int color2, float ratio) {
final float inverseRation = 1f - ratio;
float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation);
float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation);
float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * inverseRation);
return Color.rgb((int) r, (int) g, (int) b);
}

private static class SimpleTabColorizer implements SlidingTabLayout.TabColorizer {
private int[] mIndicatorColors;

Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/activity_arama.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.turkcell.gelecegiyazanlar.Activity.AramaActivity"
tools:context="com.turkcell.gelecegiyazanlar.activity.AramaActivity"
android:orientation="vertical"
android:background="@color/beyaz_renk">

Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/activity_egitim_baslik.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.turkcell.gelecegiyazanlar.Activity.EgitimBaslikActivity">
tools:context="com.turkcell.gelecegiyazanlar.activity.EgitimBaslikActivity">
<include
android:id="@+id/tool_bar2"
layout="@layout/toolbar"
Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/activity_egitim_icerik.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.turkcell.gelecegiyazanlar.Activity.EgitimIcerikActivity"
tools:context="com.turkcell.gelecegiyazanlar.activity.EgitimIcerikActivity"
android:orientation="vertical">

<include
Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/activity_profil.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@



<com.turkcell.gelecegiyazanlar.DesignEklentileri.SlidingTabLayout
<com.turkcell.gelecegiyazanlar.dizayn.SlidingTabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/tab_default_renk"
Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/fragment_arama.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.turkcell.gelecegiyazanlar.Fragment.AramaFragment"
tools:context="com.turkcell.gelecegiyazanlar.fragment.AramaFragment"
android:background="@color/profil_arkaplan_renk"
>

Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/fragment_blog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</LinearLayout>


<com.turkcell.gelecegiyazanlar.DesignEklentileri.SlidingTabLayout
<com.turkcell.gelecegiyazanlar.dizayn.SlidingTabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/tab_default_renk"
Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/fragment_egitim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
android:gravity="center_horizontal"
>

<com.turkcell.gelecegiyazanlar.DesignEklentileri.SlidingTabLayoutIcon
<com.turkcell.gelecegiyazanlar.dizayn.SlidingTabLayoutIcon
android:id="@+id/tabs"
android:layout_width="wrap_content"
android:layout_height="@dimen/tab_yukseklik"
Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/fragment_gelistiriciler.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.turkcell.gelecegiyazanlar.Fragment.ElcilerFragment">
tools:context="com.turkcell.gelecegiyazanlar.fragment.ElcilerFragment">


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
Expand Down
Loading

0 comments on commit caee1e0

Please sign in to comment.