mirror of
https://github.com/kickstarter/android-oss.git
synced 2026-03-13 09:11:01 +08:00
Remove ion icons, tiempos fonts
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
||||
[submodule "vendor/ionicons"]
|
||||
path = vendor/ionicons
|
||||
url = https://github.com/kickstarter/ionicons
|
||||
[submodule "vendor/material-design-icons"]
|
||||
path = vendor/material-design-icons
|
||||
url = https://github.com/google/material-design-icons
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -38,7 +38,6 @@ import com.kickstarter.ui.viewholders.ProjectViewHolder;
|
||||
import com.kickstarter.ui.viewholders.RewardViewHolder;
|
||||
import com.kickstarter.ui.views.IconTextView;
|
||||
import com.kickstarter.ui.views.KSWebView;
|
||||
import com.kickstarter.ui.views.TiemposTextView;
|
||||
|
||||
public interface ApplicationGraph {
|
||||
void inject(ActivityFeedActivity __);
|
||||
@@ -77,7 +76,6 @@ public interface ApplicationGraph {
|
||||
void inject(SearchPresenter __);
|
||||
void inject(SignupPresenter __);
|
||||
void inject(ThanksPresenter __);
|
||||
void inject(TiemposTextView __);
|
||||
void inject(TwoFactorPresenter __);
|
||||
void inject(ViewPledgeActivity __);
|
||||
void inject(ViewPledgePresenter __);
|
||||
|
||||
@@ -5,24 +5,16 @@ import android.graphics.Typeface;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
public class Font {
|
||||
private Typeface ionIconsTypeface;
|
||||
private Typeface materialIconsTypeface;
|
||||
private Typeface sansSerifLightTypeface;
|
||||
private Typeface sansSerifTypeface;
|
||||
private Typeface ssKickstarterTypeface;
|
||||
private Typeface tiemposTypeface;
|
||||
|
||||
public Font(@NonNull final AssetManager assetManager) {
|
||||
this.ionIconsTypeface = Typeface.createFromAsset(assetManager, "fonts/ionicons.ttf");
|
||||
this.materialIconsTypeface = Typeface.createFromAsset(assetManager, "fonts/MaterialIcons-Regular.ttf");
|
||||
this.sansSerifLightTypeface = Typeface.create("sans-serif-light", Typeface.NORMAL);
|
||||
this.sansSerifTypeface = Typeface.create("sans-serif", Typeface.NORMAL);
|
||||
this.ssKickstarterTypeface = Typeface.createFromAsset(assetManager, "fonts/ss-kickstarter.otf");
|
||||
this.tiemposTypeface = Typeface.createFromAsset(assetManager, "fonts/tiempos-regular.otf");
|
||||
}
|
||||
|
||||
public Typeface ionIconsTypeface() {
|
||||
return ionIconsTypeface;
|
||||
}
|
||||
|
||||
public Typeface materialIconsTypeface() {
|
||||
@@ -40,8 +32,4 @@ public class Font {
|
||||
public Typeface ssKickstarterTypeface() {
|
||||
return ssKickstarterTypeface;
|
||||
}
|
||||
|
||||
public Typeface tiemposTypeface() {
|
||||
return tiemposTypeface;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,7 @@ public class IconTextView extends TextView {
|
||||
|
||||
// Enum for the iconType XML parameter
|
||||
private static final int MATERIAL = 0;
|
||||
private static final int ION = 1;
|
||||
private static final int SS_KICKSTARTER = 2;
|
||||
private static final int SS_KICKSTARTER = 1;
|
||||
private static final int DEFAULT_ICON_TYPE = MATERIAL;
|
||||
|
||||
private int iconType;
|
||||
@@ -66,9 +65,6 @@ public class IconTextView extends TextView {
|
||||
case MATERIAL:
|
||||
setTypeface(font.materialIconsTypeface());
|
||||
break;
|
||||
case ION:
|
||||
setTypeface(font.ionIconsTypeface());
|
||||
break;
|
||||
case SS_KICKSTARTER:
|
||||
setTypeface(font.ssKickstarterTypeface());
|
||||
break;
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.kickstarter.ui.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.kickstarter.KSApplication;
|
||||
import com.kickstarter.libs.Font;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class TiemposTextView extends TextView {
|
||||
@Inject Font font;
|
||||
|
||||
public TiemposTextView(@NonNull final Context context) {
|
||||
super(context);
|
||||
initialize(context, null, 0, 0);
|
||||
}
|
||||
|
||||
public TiemposTextView(@NonNull final Context context, @Nullable final AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
initialize(context, attrs, 0, 0);
|
||||
}
|
||||
|
||||
public TiemposTextView(@NonNull final Context context, @Nullable final AttributeSet attrs, final int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initialize(context, attrs, defStyleAttr, 0);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public TiemposTextView(@NonNull final Context context, @Nullable final AttributeSet attrs, final int defStyleAttr,
|
||||
final int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
initialize(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
void initialize(@NonNull final Context context, @Nullable final AttributeSet attrs, final int defStyleAttr,
|
||||
final int defStyleRes) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
|
||||
if (isInEditMode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
((KSApplication) getContext().getApplicationContext()).component().inject(this);
|
||||
setTypeface(font.tiemposTypeface());
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,7 @@
|
||||
<declare-styleable name="IconTextView">
|
||||
<attr name="iconType">
|
||||
<enum name="material" value="0" />
|
||||
<enum name="ion" value="1" />
|
||||
<enum name="ss_kickstarter" value="2" />
|
||||
<enum name="ss_kickstarter" value="1" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
|
||||
1
vendor/ionicons
vendored
1
vendor/ionicons
vendored
Submodule vendor/ionicons deleted from a40523f14c
Reference in New Issue
Block a user