• Stars
    star
    1,141
  • Rank 40,852 (Top 0.9 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Takt is Android library for measuring the FPS using Choreographer.

Android Arsenal License Maven Central

Takt is Android library for measuring the FPS using Choreographer.

Takt

Screenshot

How do I use it?

Setup

Dependencies
repositories {
  mavenCentral()
}

dependencies {
  releaseImplementation 'jp.wasabeef:takt-no-op:2.1.1'
  debugImplementation 'jp.wasabeef:takt:2.1.1'
}

Functions

There is a simple initialization step which occurs in your Application class:
Simple

class MyApplication : Application() {
  override fun onCreate() {
    super.onCreate()
    Takt.stock(this)
  }
}

Options

  • seat(Seat seat) is a position
  • interval(int ms) is a interval
  • color(int color) is a text color.
  • size(int size) is a text size
  • alpha(float alpha) is a text alpha
  • listener(Audience audience) is a Listener
  • useCustomControl to manually start/stop Takt (disabled by default)
  • showOverlaySetting to enable/disable showing system overlay setting (enabled by default)
Takt.stock(this)
  .seat(Seat.BOTTOM_RIGHT)
  .interval(250)
  .color(Color.WHITE)
  .size(14f)
  .alpha(.5f)
  .listener { fps ->
    Log.d("Excellent!", fps.toString() + " fps")

    // Logcat
    // jp.wasabeef.example.takt D/Excellent!﹕ 59.28853754940712 fps
    // jp.wasabeef.example.takt D/Excellent!﹕ 59.523809523809526 fps
    // jp.wasabeef.example.takt D/Excellent!﹕ 59.05511811023622 fps
    // jp.wasabeef.example.takt D/Excellent!﹕ 55.33596837944664 fps
    // jp.wasabeef.example.takt D/Excellent!﹕ 59.523809523809526 fps
  }

Position

Takt.stock(this)
  .seat(Seat.RIGHT_CENTER)

  /**
   * TOP_RIGHT,
   * TOP_LEFT,
   * TOP_CENTER,
   *
   * CENTER,
   * RIGHT_CENTER,
   * LEFT_CENTER,
   *
   * BOTTOM_RIGHT,
   * BOTTOM_LEFT,
   * BOTTOM_CENTER
   */

Hide fps label

Takt.stock(this)
  .hide()
  .listener { fps -> Log.d("Excellent!", fps.toString() + " fps") }

Requirements

Android 4.1+ (using the Choreographer)

Developed By

Daichi Furiya (Wasabeef) - [email protected]

Follow me on Twitter

License

Copyright (C) 2020 Wasabeef

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

awesome-android-ui

A curated list of awesome Android UI/UX libraries
49,845
star
2

recyclerview-animators

An Android Animation library which easily add itemanimator to RecyclerView items.
Kotlin
11,486
star
3

glide-transformations

An Android transformation library providing a variety of image transformations for Glide.
Java
9,889
star
4

richeditor-android

RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.
Java
6,217
star
5

Blurry

Blurry is an easy blur library for Android
Java
5,572
star
6

awesome-android-libraries

This is an alphabetical list of libraries for Android development, the majority being actively maintained.
5,503
star
7

picasso-transformations

An Android transformation library providing a variety of image transformations for Picasso
Java
1,690
star
8

flutter-architecture-blueprints

Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to developing Flutter apps.
Dart
1,602
star
9

fresco-processors

An Android image processor library providing a variety of image transformations for Fresco.
Java
895
star
10

awesome-android-tools

A curated list of awesome Android Tools.
337
star
11

transformers

An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.
Kotlin
294
star
12

flutter_use

Play Flutter Hooks.
Dart
210
star
13

kotlin-mvvm

Sample for MVVM using Kotlin
Kotlin
181
star
14

droid

A command-line tool for checking Android OS version history written by Rust.
Rust
114
star
15

composable-images

The Composable Images is a library providing Jetpack Compose wrapper for Glide, Picasso, and Coil.
Kotlin
107
star
16

android-RoundedTextureView

RoundedTextureView Sample
Java
51
star
17

flutter_ua_client_hints

Provide User-Agent Client Hints to a Flutter app.
Dart
44
star
18

compose-gap

Easily adding gaps inside such as Columns and Rows for Jetpack Compose.
Kotlin
36
star
19

gifflen-sample

Bitmap color reduction and GIF encoding
C++
31
star
20

flutter_hooks_test

Simple and complete Flutter hooks testing utilities that encourage good testing practices.
Dart
31
star
21

vagrant-kali-linux

Vagrant Boxes - Kali Linux
25
star
22

NavPlayground

This is a sample of Navigation component.
Kotlin
18
star
23

version_gen

The Dart code generator for your package versions. 🎯
Dart
16
star
24

dockerfiles

A collection of Dockerfiles
Shell
12
star
25

wasabeef.jp

Build a web site using the Flutter Web.
Dart
11
star
26

import-asdf-tool-versions-action

⚒️ Import .tool-versions of asdf to GitHub Actions workflows.
JavaScript
11
star
27

adball

Adb All devices command
11
star
28

java-code-style

IntelliJ IDEA code style settings for Wasabeef's Java and Android projects.
6
star
29

dotfiles

Managed using chezmoi.
Lua
4
star
30

wasabeef

3
star