Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/kdoc #24

Merged
merged 2 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import org.gradle.api.JavaVersion

plugins {
id("com.android.application")
id("kotlin-android")
}

android {
Expand All @@ -11,15 +10,13 @@ android {
applicationId = "com.tomerrosenfeld.fadingtextview"
minSdk = 23
targetSdk = 33
vectorDrawables.useSupportLibrary = true
versionCode = 2
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}
Expand All @@ -28,6 +25,7 @@ android {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
namespace = "com.tomerrosenfeld.fadingtextview"
}

dependencies {
Expand All @@ -37,6 +35,6 @@ dependencies {
implementation(project(":fadingtextview"))
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("org.adw.library:discrete-seekbar:1.0.1")
implementation("com.github.AnderWeb:discreteSeekBar:99e62e6cd0")
testImplementation("junit:junit:4.13.2")
}

This file was deleted.

6 changes: 2 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tomerrosenfeld.fadingtextview">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:fullBackupContent="true">
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.tomerrosenfeld.fadingtextview

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import com.tomer.fadingtextview.FadingTextView
import org.adw.library.widgets.discreteseekbar.BuildConfig
import org.adw.library.widgets.discreteseekbar.DiscreteSeekBar
import java.util.Random
import kotlin.time.Duration.Companion.seconds

class MainActivity : AppCompatActivity() {
private val jokes = intArrayOf(R.array.examples_1, R.array.examples_2, R.array.examples_3)

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val toolbar = findViewById<Toolbar>(R.id.toolbar)
setSupportActionBar(toolbar)
//FadingTextView related code
val fadingTextView = findViewById<FadingTextView>(R.id.fadingTextView)
fadingTextView.setTimeout(2.seconds)
//Setting up the timeout seek bar
val seekBar = findViewById<DiscreteSeekBar>(R.id.timeout_bar)
seekBar.setOnProgressChangeListener(object : DiscreteSeekBar.OnProgressChangeListener {
override fun onProgressChanged(
seekBar: DiscreteSeekBar,
value: Int,
fromUser: Boolean
) {
fadingTextView.setTimeout(value.seconds)
fadingTextView.forceRefresh()
}

override fun onStartTrackingTouch(seekBar: DiscreteSeekBar) {}
override fun onStopTrackingTouch(seekBar: DiscreteSeekBar) {}
})
//Setting up the Github Floating Action Button
findViewById<View>(R.id.fab).setOnClickListener {
val browserIntent = Intent(
Intent.ACTION_VIEW,
Uri.parse("http://github.com/rosenpin/FadingTextView")
)
browserIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
startActivity(browserIntent)
}
//Show jokes if the app is in production
if (!BuildConfig.DEBUG) {
fadingTextView.setTexts(jokes[Random().nextInt(3 + 1)])
}
}
}

This file was deleted.

10 changes: 6 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
buildscript {
val kotlin_version = "1.6.21"
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath("com.android.tools.build:gradle:7.4.2")
classpath("com.android.tools.build:gradle:8.0.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4")
classpath("com.github.dcendents:android-maven-gradle-plugin:1.4.1")
}
}

allprojects {
repositories {
jcenter()
maven {
url = uri("https://jitpack.io")
}
mavenCentral()
maven {
url = uri("https://maven.google.com")
}
Expand Down
20 changes: 0 additions & 20 deletions docs/allclasses-frame.html

This file was deleted.

20 changes: 0 additions & 20 deletions docs/allclasses-noframe.html

This file was deleted.

Loading