Skip to content

Commit

Permalink
Fixed gitignore, app code should now be available
Browse files Browse the repository at this point in the history
  • Loading branch information
rosenpin committed Mar 10, 2017
1 parent 6e54951 commit ce950ca
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
.externalNativeBuild
.idea
app/libs/
app/src/main/java/
app/src/main/res/drawable/
private_key_sender.asc
public_key_sender.asc
*.jks
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.tomerrosenfeld.fadingtextview;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;

import com.tomer.fadingtextview.FadingTextView;

import org.adw.library.widgets.discreteseekbar.DiscreteSeekBar;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
//FadingTextView related code
final FadingTextView fadingTextView = (FadingTextView) findViewById(R.id.fadingTextView);
fadingTextView.setTimeout(2, FadingTextView.TimeUnit.SECONDS);
//Setting up the timeout seek bar
DiscreteSeekBar seekBar = (DiscreteSeekBar) findViewById(R.id.timeout_bar);
seekBar.setOnProgressChangeListener(new DiscreteSeekBar.OnProgressChangeListener() {
@Override
public void onProgressChanged(DiscreteSeekBar seekBar, int value, boolean fromUser) {
fadingTextView.setTimeout(value, FadingTextView.TimeUnit.SECONDS);
fadingTextView.forceRefresh();
}

@Override
public void onStartTrackingTouch(DiscreteSeekBar seekBar) {

}

@Override
public void onStopTrackingTouch(DiscreteSeekBar seekBar) {

}
});
//Setting up the Github Floating Action Button
findViewById(R.id.fab).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.github.com/rosenpin/FadingTextView"));
browserIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(browserIntent);
}
});
}
}
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/ic_github.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#000" android:pathData="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" />
</vector>

0 comments on commit ce950ca

Please sign in to comment.