Skip to content

Commit

Permalink
Initial commit for Bitbucket.
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitserin committed Jul 8, 2018
1 parent 123d933 commit 0e027a4
Show file tree
Hide file tree
Showing 116 changed files with 1,483 additions and 385 deletions.
85 changes: 85 additions & 0 deletions .gitignore
@@ -0,0 +1,85 @@
*.iml
.gradle
/local.properties
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild

# Created by https://www.gitignore.io/api/android

### Android ###
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

### Android Patch ###
gen-external-apklibs


# End of https://www.gitignore.io/api/android
29 changes: 29 additions & 0 deletions .idea/codeStyles/Project.xml

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

34 changes: 34 additions & 0 deletions .idea/misc.xml

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

9 changes: 9 additions & 0 deletions .idea/modules.xml

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

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

53 changes: 36 additions & 17 deletions app/build.gradle
Expand Up @@ -2,14 +2,14 @@ apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.mts.fategocardmaker"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion 19
targetSdkVersion 26
versionCode 2
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -21,19 +21,38 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.karumi:dexter:4.0.0'
compile 'com.github.jkwiecien:EasyImage:1.2.3'
compile 'com.afollestad.material-dialogs:core:0.9.4.1'
compile "com.davemorrissey.labs:subsampling-scale-image-view:3.6.0"
compile 'com.jakewharton:butterknife:8.5.1'
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
implementation 'com.android.support:appcompat-v7:26.0.1'
implementation 'com.google.android.gms:play-services-ads:11.4.0'
implementation 'com.karumi:dexter:4.1.0'
implementation 'com.github.jkwiecien:EasyImage:1.3.1'
implementation "com.davemorrissey.labs:subsampling-scale-image-view:3.6.0"
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.mikepenz:fontawesome-typeface:4.7.0.1@aar'
implementation 'com.afollestad.material-dialogs:core:0.9.4.7'
implementation('com.mikepenz:materialdrawer:5.9.5@aar') {
transitive = true
}
implementation('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
testCompile 'junit:junit:4.12'
implementation 'com.github.bumptech.glide:glide:4.1.1'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.8'
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
testImplementation 'junit:junit:4.12'
}

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.1'
}
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Expand Up @@ -11,7 +11,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/MaterialDrawerTheme.Light.DarkToolbar">
<activity android:name=".main.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Binary file added app/src/main/assets/fonts/fretqwik.ttf
Binary file not shown.
@@ -0,0 +1,75 @@
package com.mts.fategocardmaker.adapters;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.mts.fategocardmaker.R;
import com.mts.fategocardmaker.model.ServantSpinnerItem;

import java.util.ArrayList;

public class ClassIconAdapter extends RecyclerView.Adapter<ClassIconAdapter.RarityVH> {

private ArrayList<ServantSpinnerItem> items;
private ClassIconItemCallback itemCallback;

public interface ClassIconItemCallback {
void onItemClicked(int itemIndex, String iconName);
}

public void setItemCallback(ClassIconItemCallback itemCallback) {
this.itemCallback = itemCallback;
}

public ClassIconAdapter(ArrayList<ServantSpinnerItem> items) {
this.items = items;
}

@Override
public RarityVH onCreateViewHolder(ViewGroup parent, int viewType) {
final View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_class_icon, parent, false);
return new RarityVH(view, this);
}

@Override
public void onBindViewHolder(RarityVH holder, int position) {
ServantSpinnerItem item = items.get(position);
holder.tvTitle.setText(item.getName());
holder.ivIcon.setImageResource(item.getId());
}

@Override
public int getItemCount() {
return items.size();
}

static class RarityVH extends RecyclerView.ViewHolder implements View.OnClickListener{

final TextView tvTitle;
final ImageView ivIcon;
final ClassIconAdapter adapter;

RarityVH(View itemView, ClassIconAdapter adapter) {
super(itemView);
tvTitle = (TextView)itemView.findViewById(R.id.tvTitle);
ivIcon = (ImageView)itemView.findViewById(R.id.ivIcon);

this.adapter = adapter;
itemView.setOnClickListener(this);
}

@Override
public void onClick(View v) {
if (adapter.itemCallback == null){
return;
}else{
adapter.itemCallback.onItemClicked(getAdapterPosition(),adapter.items.get(getAdapterPosition()).getName());
}
}
}

}

0 comments on commit 0e027a4

Please sign in to comment.