kandi background
Explore Kits

HTextView | Animation effects to text, not really textview | Animation library

 by   hanks-zyh Java Version: Current License: Apache-2.0

 by   hanks-zyh Java Version: Current License: Apache-2.0

Download this library from

kandi X-RAY | HTextView Summary

HTextView is a Java library typically used in User Interface, Animation applications. HTextView has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.
Animation effects with custom font support to TextView. see iOS Effects see Flutter Effects.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • HTextView has a medium active ecosystem.
  • It has 5254 star(s) with 791 fork(s). There are 129 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 38 open issues and 58 have been closed. On average issues are closed in 219 days. There are 2 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of HTextView is current.
HTextView Support
Best in #Animation
Average in #Animation
HTextView Support
Best in #Animation
Average in #Animation

quality kandi Quality

  • HTextView has 0 bugs and 0 code smells.
HTextView Quality
Best in #Animation
Average in #Animation
HTextView Quality
Best in #Animation
Average in #Animation

securitySecurity

  • HTextView has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • HTextView code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
HTextView Security
Best in #Animation
Average in #Animation
HTextView Security
Best in #Animation
Average in #Animation

license License

  • HTextView is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
HTextView License
Best in #Animation
Average in #Animation
HTextView License
Best in #Animation
Average in #Animation

buildReuse

  • HTextView releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • HTextView saves you 1759 person hours of effort in developing the same functionality from scratch.
  • It has 3892 lines of code, 253 functions and 94 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
HTextView Reuse
Best in #Animation
Average in #Animation
HTextView Reuse
Best in #Animation
Average in #Animation
Top functions reviewed by kandi - BETA

kandi has reviewed HTextView and discovered the below as its top functions. This is intended to give you an instant insight into HTextView implemented functionality, and help decide if they suit your requirements.

  • Blur blur .
  • Initializes the view .
  • draw text frame
  • Initialize the view .
  • Draw text .
  • Calculate text size .
  • Initialize random variables
  • Returns a list of character diff results
  • Calculate the start and end padding
  • draw the smoke

HTextView Key Features

Animation effects to text, not really textview

Usage

copy iconCopydownload iconDownload
def htextview_version = "0.1.6"
// as 3.0 use implementation
compile "com.hanks:htextview-base:$htextview_version"        // base library

compile "com.hanks:htextview-fade:$htextview_version"        // optional
compile "com.hanks:htextview-line:$htextview_version"        // optional
compile "com.hanks:htextview-rainbow:$htextview_version"     // optional
compile "com.hanks:htextview-typer:$htextview_version"       // optional

compile "com.hanks:htextview-scale:$htextview_version"       // optional
compile "com.hanks:htextview-evaporate:$htextview_version"   // optional
compile "com.hanks:htextview-fall:$htextview_version"        // optional

line

copy iconCopydownload iconDownload
<com.hanks.htextview.line.LineTextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="right"
    android:paddingRight="10dp"
    android:text="This is LineTextView\nToday is Monday"
    android:textSize="16sp"
    app:animationDuration="3000"
    app:lineColor="#1367bc"
    app:lineWidth="4dp"/>

fade

copy iconCopydownload iconDownload
<com.hanks.htextview.fade.FadeTextView
    android:layout_width="240dp"
    android:layout_height="150dp"
    android:gravity="left"
    android:letterSpacing="0.08"
    android:lineSpacingMultiplier="1.3"
    android:text="This is FadeTextView"
    android:textColor="#fff"
    android:textSize="20sp"
    app:animationDuration="1500"/>

typer

copy iconCopydownload iconDownload
<com.hanks.htextview.typer.TyperTextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="this is init sentence."
    app:charIncrease="3"
    app:typerSpeed="80"/>

rainbow

copy iconCopydownload iconDownload
<com.hanks.htextview.rainbow.RainbowTextView
    android:layout_width="120dp"
    android:layout_height="wrap_content"
    android:gravity="right"
    android:text="this is init sentence"
    android:textSize="20sp"
    app:colorSpace="150dp"
    app:colorSpeed="4dp"/>

scale (single line)

copy iconCopydownload iconDownload
<com.hanks.htextview.scale.ScaleTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="this is init sentence"
    android:textSize="16sp"/>

evaporate (single line)

copy iconCopydownload iconDownload
<com.hanks.htextview.evaporate.EvaporateTextView
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:gravity="center"
    android:paddingTop="8dp"
    android:text="this is init sentence"
    android:textSize="20sp"/>

fall (single line)

copy iconCopydownload iconDownload
<com.hanks.htextview.fall.FallTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingBottom="20dp"
    android:text="this is init sentence"
    android:textSize="16sp"/>

License

copy iconCopydownload iconDownload
Copyright (C) 2015 [Hanks](https://github.com/hanks-zyh)

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.

Authentication, log in and password

copy iconCopydownload iconDownload
else {
        profile = null;
     }
private void getProfile() {
    String email = editTextEmail.getText().toString();
    String password = editTextPassword.getText().toString();
    profile = null;
    if (!email.trim().isEmpty() || !password.trim().isEmpty()) {
        if (email.equals("alaaZ@gmail.com") && password.equals("alaa")) {
            profile = arrayList.get(0);
        } else if (email.equals("olaA@gmail.com") && password.equals("ola")) {
            profile = arrayList.get(1);
        } else if (email.equals("magdyMX@gmail.com") && password.equals("magdy")) {
            profile = arrayList.get(2);
        } else if (email.equals("israAh@gmail.com") && password.equals("isra")) {
            profile = arrayList.get(3);
        }
    }
}
-----------------------
else {
        profile = null;
     }
private void getProfile() {
    String email = editTextEmail.getText().toString();
    String password = editTextPassword.getText().toString();
    profile = null;
    if (!email.trim().isEmpty() || !password.trim().isEmpty()) {
        if (email.equals("alaaZ@gmail.com") && password.equals("alaa")) {
            profile = arrayList.get(0);
        } else if (email.equals("olaA@gmail.com") && password.equals("ola")) {
            profile = arrayList.get(1);
        } else if (email.equals("magdyMX@gmail.com") && password.equals("magdy")) {
            profile = arrayList.get(2);
        } else if (email.equals("israAh@gmail.com") && password.equals("isra")) {
            profile = arrayList.get(3);
        }
    }
}

Community Discussions

Trending Discussions on HTextView
  • Authentication, log in and password
Trending Discussions on HTextView

QUESTION

Authentication, log in and password

Asked 2020-Feb-20 at 20:33

I have a simple log in Activity with two texts and one button, one for email and the other for password.

Once the login button is pressed, a new Activity called profile is launched. I hardcoded a bunch of info to match the input so the intent launches the second Activity. This works fine.

However, when I press the back button on the phone it goes back to the login Activity. But when I press the login button again, it shows the same results, even if I change the input:

If I input the email and the password that are already in the ArrayList, it launches the second Activity. Now if I go back to the login Activity by pressing the back button on the phone, the email and password text box still retains the values. Now if I remove the password and press login, it shows the same results, the same profile I log in, whereas it must prevent me from logging in because the password is incorrect

Note: the hardcoded Infos are stored in an Arraylist with a custom class, the custom class contains nothing but 5 strings for basic info. Moreover, this class implements Serializable, hence granting the ability to pass the object of this custom class via Intent.

Login Activity :

package just.innovates.isra;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.hanks.htextview.base.HTextView;

import java.util.ArrayList;

public class LoginActivity extends AppCompatActivity {
    public static final String EXTRA_LOGIN = "just.innovates.isra.EXTRA_LOGIN";

    private ArrayList<Profile> arrayList = new ArrayList<>();
    private Profile profile;
    private EditText editTextEmail;
    private EditText editTextPassword;

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

        findViewById(R.id.tv_login_register).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(LoginActivity.this, RegisterActivity.class));
            }
        });

        editTextEmail = findViewById(R.id.et_login_email);
        editTextPassword = findViewById(R.id.et_login_password);

        arrayList.add(new Profile("Alaa", "Zarnaji", "aLaaZ@gmail.com", "alaa", "01145874123", R.drawable.alaa));
        arrayList.add(new Profile("Ola", "Ahmed", "olaA@gmail.com", "ola", "0123654585", R.drawable.ola));
        arrayList.add(new Profile("Muhammad", "Magdy", "magdyM@gmail.com", "magdy", "01014525874", R.drawable.magdy));
        arrayList.add(new Profile("Isra", "Ahmed", "israA@gmail.com", "isra", "01145214587", R.drawable.isra));

        findViewById(R.id.btn_login_sign_in).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                getProfile();
                if (profile != null) {
                    Intent intent = new Intent(LoginActivity.this, ProfileActivity.class);
                    intent.putExtra(EXTRA_LOGIN, profile);
                    startActivity(intent);
                } else {
                    Toast.makeText(LoginActivity.this, "Wrong Email or password", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }

    private void getProfile() {
        String email = editTextEmail.getText().toString();
        String password = editTextPassword.getText().toString();

        if (!email.trim().isEmpty() || !password.trim().isEmpty()) {
            if (email.equals("alaaZ@gmail.com") && password.equals("alaa")) {
                profile = arrayList.get(0);
            } else if (email.equals("olaA@gmail.com") && password.equals("ola")) {
                profile = arrayList.get(1);
            } else if (email.equals("magdyMX@gmail.com") && password.equals("magdy")) {
                profile = arrayList.get(2);
            } else if (email.equals("israAh@gmail.com") && password.equals("isra")) {
                profile = arrayList.get(3);
            }
        }
    }
}

Profile Activity :

package just.innovates.isra;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class ProfileActivity extends AppCompatActivity {
    private TextView textViewNameFirst;
    private TextView textViewNameLast;
    private TextView textViewEmail;
    private TextView textViewPassword;
    private TextView textViewPhone;
    private ImageView imageView;
    private Profile profile;

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

        Intent intent = getIntent();
        if (intent.hasExtra(RegisterActivity.EXTRA_PROFILE)) {
            profile = (Profile) intent.getSerializableExtra(RegisterActivity.EXTRA_PROFILE);
        }else if (intent.hasExtra(LoginActivity.EXTRA_LOGIN)){
            profile = (Profile) intent.getSerializableExtra(LoginActivity.EXTRA_LOGIN);
        }

        setUI();
        assert profile != null;
        if (profile.isImage()) {
            imageView.setImageResource(profile.getImageURL());
        } else {
            imageView.setVisibility(View.GONE);
        }

        textViewNameFirst.setText(profile.getFirstName());
        textViewNameLast.setText(profile.getSecondName());
        textViewEmail.setText(profile.getEmail());
        textViewPassword.setText(profile.getPassword());
        textViewPhone.setText(profile.getPhone());
    }

    private void setUI() {
        textViewNameFirst = findViewById(R.id.nameFirst);
        textViewNameLast = findViewById(R.id.nameLast);
        textViewEmail = findViewById(R.id.email);
        textViewPassword = findViewById(R.id.password);
        textViewPhone = findViewById(R.id.phone);
        imageView = findViewById(R.id.image);
    }
}

ANSWER

Answered 2020-Feb-20 at 20:33

When you input the email and password contained in the ArrayList, and launch SecondActivity by pressing login, the profile object stores those values. And then you press back, remove password and press login again all your check does is decide the value of profile object...not actually interfere with login procedure. So when you go back and change values, your profile still holds the old value from the array you used earlier. You should add another else statement for when none of the conditions match and you make your profile null, so that the check in your listener shows the toast.

So add this final else statement in your getProfile() method after all the else if statements

else {
        profile = null;
     }

Or instead of writing the else condition twice for when both are empty or fields don't match you can simply set it to null every time getProfile() is called. Method should look like this

private void getProfile() {
    String email = editTextEmail.getText().toString();
    String password = editTextPassword.getText().toString();
    profile = null;
    if (!email.trim().isEmpty() || !password.trim().isEmpty()) {
        if (email.equals("alaaZ@gmail.com") && password.equals("alaa")) {
            profile = arrayList.get(0);
        } else if (email.equals("olaA@gmail.com") && password.equals("ola")) {
            profile = arrayList.get(1);
        } else if (email.equals("magdyMX@gmail.com") && password.equals("magdy")) {
            profile = arrayList.get(2);
        } else if (email.equals("israAh@gmail.com") && password.equals("isra")) {
            profile = arrayList.get(3);
        }
    }
}

Source https://stackoverflow.com/questions/60325700

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install HTextView

You can download it from GitHub.
You can use HTextView like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the HTextView component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.