Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Finished 0.2.1:
Browse files Browse the repository at this point in the history
Fixed issue reporter
added version id to about
  • Loading branch information
AdrianVovk committed Nov 6, 2015
1 parent 5a48778 commit 47e97b6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 29 deletions.
4 changes: 2 additions & 2 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
defaultConfig {
applicationId "com.animbus.music"
targetSdkVersion 23
versionName '0.2.0'
versionCode 12
versionName '0.2.1'
versionCode 13
signingConfig signingConfigs.config
minSdkVersion 17
}
Expand Down
2 changes: 1 addition & 1 deletion mobile/mobile.iml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="gson-2.2.2" level="project" />
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.2" level="project" />
<orderEntry type="library" exported="" name="compiler-1.0-rc4" level="project" />
<orderEntry type="library" exported="" name="palette-v7-23.1.0" level="project" />
<orderEntry type="library" exported="" name="org.eclipse.egit.github.core-2.1.5" level="project" />
Expand Down
40 changes: 17 additions & 23 deletions mobile/src/main/java/com/animbus/music/data/list/ListAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import com.animbus.music.ui.ItemSongList;
import com.animbus.music.ui.albumDetails.AlbumDetails;
import com.animbus.music.ui.theme.ThemeManager;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
Expand Down Expand Up @@ -128,6 +126,13 @@ public void setTransitionToAlbumDetails(Activity activity, Toolbar toolbar, View
protected abstract class SimpleViewHolder<BINDING extends ViewDataBinding, TYPE> extends RecyclerView.ViewHolder {
protected BINDING binding;

protected final int COLOR_DUR = 300;
protected final int COLOR_DELAY_BASE = 550;
protected final int COLOR_DELAY_MAX = 750;

protected final int LIST_ANIM_DELAY = 10;
protected final int LIST_ANIM_DUR = 500;

protected SimpleViewHolder(BINDING binding) {
super(binding.getRoot());
this.binding = binding;
Expand All @@ -136,6 +141,7 @@ protected SimpleViewHolder(BINDING binding) {
public void update(TYPE object) {
binding.setVariable(getVarId(), object);
configure(object);
animate();
}

private int getVarId() {
Expand All @@ -159,6 +165,10 @@ private int getVarId() {

protected abstract void configure(TYPE object);

protected void animate() {

}

}

protected class SongsViewHolder extends SimpleViewHolder<ItemSongList, Song> implements View.OnClickListener {
Expand All @@ -170,13 +180,7 @@ public SongsViewHolder(ItemSongList binding) {
@Override
public void configure(Song object) {
binding.getRoot().setOnClickListener(this);
Glide.with(context).load(object.getAlbum().getAlbumArtPath())
.placeholder(!ThemeManager.get().useLightTheme ? R.drawable.art_dark : R.drawable.art_light)
.animate(android.R.anim.fade_in)
.crossFade()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.centerCrop()
.into(binding.songlistSongAlbumart);
object.getAlbum().requestArt(context, binding.songlistSongAlbumart);
}

@Override
Expand All @@ -188,14 +192,6 @@ public void onClick(View v) {
protected class AlbumsViewHolder extends SimpleViewHolder<ItemAlbumGrid, Album> implements RequestListener<String, GlideDrawable>,
Palette.PaletteAsyncListener, View.OnClickListener, View.OnLongClickListener {

private static final int COLOR_DUR = 300;
private static final int COLOR_DELAY_BASE = 550;
private static final int COLOR_DELAY_MAX = 750;

private static final int GRID_ANIM_DELAY = 10;
private static final int GRID_ANIM_DUR = 500;


private AsyncTask<Bitmap, Void, Palette> paletteTask;
private ObjectAnimator backgroundAnimator, titleAnimator, subtitleAnimator;
private int defaultBackground = context.getResources().getColor(!ThemeManager.get().useLightTheme ? R.color.primaryGreyDark : R.color.primaryLight);
Expand All @@ -212,11 +208,10 @@ public AlbumsViewHolder(ItemAlbumGrid binding) {
public void configure(Album object) {
resetPalette();
binding.getAlbum().requestArt(context, binding.AlbumArtGridItemAlbumArt, this);
animate();

}

private void animate() {
@Override
protected void animate() {
if (!binding.getAlbum().animated) {
binding.getAlbum().animated = true;

Expand All @@ -234,12 +229,11 @@ private void animate() {

if (getAdapterPosition() <= animateTill) {
binding.AlbumGridItemRootView.setTranslationY(800.0f);
int delayPart = getAdapterPosition() * 100;
binding.AlbumGridItemRootView.animate()
.translationY(0.0f)
.alpha(1.0f)
.setDuration(GRID_ANIM_DUR)
.setStartDelay(GRID_ANIM_DELAY + delayPart)
.setDuration(LIST_ANIM_DUR)
.setStartDelay(LIST_ANIM_DELAY + (getAdapterPosition() * 100))
.start();
} else binding.AlbumGridItemRootView.setAlpha(1.0f);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public class IssueReportingActivity extends GittyReporter {
@Override
public void init(Bundle savedInstanceState) {
setTargetRepository("Substance-Project", "GEM");
setGuestOAuth2Token("START4fd1b70e07912c26c60c06ffa220c7c5c417334b");

//Using substring so GitHub doesn't terminate the access token
setGuestOAuth2Token("START4fd1b70e07912c26c60c06ffa220c7c5c417334b".substring(5));
enableGuestGitHubLogin(true);
enableUserGitHubLogin(true);
setExtraInfo(getExtraInfo());
Expand All @@ -33,6 +35,7 @@ public void init(Bundle savedInstanceState) {
public String getExtraInfo(){
String s = "";
s += "\n App Version: " + BuildConfig.VERSION_NAME;
s += "\n App Version ID: " + BuildConfig.VERSION_CODE;
return s;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected void setVariables() {
protected void setUp() {
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
((TextView) findViewById(R.id.about_version_text_view)).setText(BuildConfig.VERSION_NAME);
((TextView) findViewById(R.id.about_version_text_view)).setText(BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")");
DrawableCompat.setTint(((ImageView) findViewById(R.id.about_code_icon)).getDrawable(), !ThemeManager.get().useLightTheme ? Color.WHITE : Color.BLACK);
DrawableCompat.setTint(((ImageView) findViewById(R.id.about_version_icon)).getDrawable(), !ThemeManager.get().useLightTheme ? Color.WHITE : Color.BLACK);
((ImageView) findViewById(R.id.about_icon))
Expand Down
2 changes: 1 addition & 1 deletion mobile/src/main/res/raw/update.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11
12

0 comments on commit 47e97b6

Please sign in to comment.