Abdusoli
Abdusoli

Reputation: 659

A library is not working on Nougat (API Level 24)

I used compile 'com.sdsmdg.harjot:rotatingtext:1.0.2' in Android app. It is working in Android Marshmallow API 22 and lower versions. To be more precise, It rotates text with Animation. In Android with Api level 22 and lover it is showing text with Animation. But higher versions don`t support. What should I do to be supported in all versions of Android devices. Please Help. Here is Source Code: MainActivity.java

package com.example.abdusoli.rotatingtext;

import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.animation.BounceInterpolator;
import android.widget.Button;
import android.text.TextUtils;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;

import com.sdsmdg.harjot.rotatingtext.RotatingTextWrapper;
import com.sdsmdg.harjot.rotatingtext.models.Rotatable;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/Raleway-Light.ttf");
        Typeface typeface2 = Typeface.createFromAsset(getAssets(), "fonts/Reckoner_Bold.ttf");

        RotatingTextWrapper rotatingTextWrapper = (RotatingTextWrapper) findViewById(R.id.custom_switcher);
        rotatingTextWrapper.setSize(35);
        rotatingTextWrapper.setTypeface(typeface2);

        Rotatable rotatable = new Rotatable(Color.parseColor("#FFA036"), 2000, " ", "Word01", "Word02");
        rotatable.setSize(35);
        rotatable.setAnimationDuration(600);
        rotatable.setTypeface(typeface);
        rotatable.setInterpolator(new BounceInterpolator());

        rotatingTextWrapper.setContent("This is ?", rotatable);

    }

}

gradle.build(Module: app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.abdusoli.rotatingtext"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:cardview-v7:26.1.+'
    compile 'com.flaviofaria:kenburnsview:1.0.7'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.sdsmdg.harjot:rotatingtext:1.0.2'
}

Upvotes: 0

Views: 288

Answers (1)

Manjee
Manjee

Reputation: 26

Currently the library does not support higher versions

Issue has been raised on the repo in github

Upvotes: 1

Related Questions