Falling Animation in ANDROID using Animation of Translate

Posted by Unknown Sabtu, 20 April 2013 0 komentar
Falling animation is used to bring transition to a view between two X points or two Y points. In Android, you can apply this scaling effect to almost anything, from simple text, to images, buttons, etc…

in res/anim/falling.xml
suppose if transition to be done between two different X indexes use..
 
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<translate
android:fromXDelta="-100%p"
android:toXDelta="0"
android:duration="2000"/>
</set>

suppose if transition to be done between two different Y indexes use..
 
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<translate
android:fromYDelta="-100%p"
android:toYDelta="0"
android:duration="2000"/>
</set> 
The java source code is given below
 
public class Textviewanimation extends Activity {
TextView tv;
Button startanimation;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_textviewanimation);

tv=(TextView) findViewById(R.id.textview);
startanimation=(Button) findViewById(R.id.button1);
tv.setText("Android is a Linux-based operating system designed primarily for touchscreen mobile devices such as smartphones and tablet computers.");

final Animation falling = AnimationUtils.loadAnimation(this,R.anim.falling);
startanimation.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
tv.startAnimation(falling);
}
}); }
}
see more :

Baca Selengkapnya ....

Scaling Animation In ANDROID

Posted by Unknown Jumat, 19 April 2013 0 komentar
Scaling animation is used to scale a view. In Android, you can apply this scaling effect to almost anything, from simple text, to images, buttons, etc…

 Here simply I will explain a scaling textview which you can apply to other views also... In res/anim/scale.xml
 
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<scale
android:fromXScale="0.0"
android:toXScale="1.0"
android:fromYScale="0.0"
android:toYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:duration="2000" />
</set>
Java source code is given below
 
public class Textviewanimation extends Activity {
Animation fadeIn,fadeOut;
TextView tv;
Button startanimation;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_textviewanimation);

tv=(TextView) findViewById(R.id.textview);
startanimation=(Button) findViewById(R.id.button1);
tv.setText("This is an animated textview");

final Animation Scale = AnimationUtils.loadAnimation(this,R.anim.scale);
startanimation.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
tv.startAnimation(Scale);
}
}); }
}
see more: 

Baca Selengkapnya ....

TextView Animation or Alpha animation (FadeIn , FadeOut) in ANDROID

Posted by Unknown 0 komentar
An Alpha Animation is animation that controls the alpha level of an object, i.e. fading it in and out. In Android, you can apply that fading effect to almost anything, from simple text, to images, buttons, check boxes, etc…
 
This can be done both from xml and from java class.

Here I will explain a simple way to give a FadeIn and FadeOut for a textview on button click..
 

public class Textviewanimation extends Activity {

Animation fadeIn,fadeOut;
TextView tv;
Button startanimation;
Boolean fadeflag=true;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_textviewanimation);

tv=(TextView) findViewById(R.id.textview);
startanimation=(Button) findViewById(R.id.button1);

fadeIn = new AlphaAnimation(0.0f , 1.0f ) ;
fadeIn.setDuration(1200);
fadeIn.setFillAfter(true);

fadeOut = new AlphaAnimation(1.0f , 0.0f);
fadeOut.setDuration(1200);
fadeOut.setFillAfter(true);

startanimation.setText("Start fadeIn");
startanimation.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {

if(fadeflag)
{
startanimation.setText("Start fadeOut");
tv.setText("This is an animated textview");
tv.startAnimation(fadeIn);
fadeflag=false;
}
else
{
startanimation.setText("Start fadeIn");
tv.setText("This is an animated textview");
tv.startAnimation(fadeOut);
fadeflag=true;
} } });
}
}

This same can be done with xml by creating an xml in res/anim/fadein
 




and res/anim/fadeout
 




Then in java
 
Animation animationFadeIn = AnimationUtils.loadAnimation(this,R.anim.fadein);
tv.startAnimation(animationFadeIn);
same way call the other

see more 
Falling animation ..

Baca Selengkapnya ....

What is a TEXTWATCHER in ANDROID ?

Posted by Unknown 0 komentar
TextWatcher is used to keep watch on EditText while entering data into it. We can perform
operation and keep watch on which characters are being entered or how many characters are
being entered in the EditText.  

Text Watcher has three events.
 1.beforeTextChanged : This means that the characters are about to be replaced with some
 new text. The text is uneditable. This event is used when you need to take a look at the old
 text which is about to change.

 2.onTextChanged: Changes have been made, some characters have just been replaced.
The text is uneditable. This event is used when you need to see which characters in the
text are new.

 3.afterTextChanged : The same as above, except now the text is editable. This event is
used when you need to see and possibly edit new text.  
Java source code is given below
 
EditText myedittext;
myedittext = (EditText)findViewById(R.id.edittext);
myedittext.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s)
{
}

public void beforeTextChanged(CharSequence s, int start,
int count, int after)
{
}

public void onTextChanged(CharSequence s, int start,
int before, int count)
{
}
});

Baca Selengkapnya ....

WhatsApp CEO: We Have Bigger User Base Than Twitter

Posted by Unknown 0 komentar
WhatsApp was initially released as a free app, but now is gradually phasing into a subscription app, charging 99 cents per year. The app has stayed clear of advertisements. "We do have a manifesto opposing advertising," Koum said in an interview with allthingsd...

 see more: http://www.gizbot.com/apps-software/whatsapp-ceo-we-have-bigger-user-base-than-twitter-011730.html

Baca Selengkapnya ....

Anonymous Animals in Google Drive

Posted by Unknown 0 komentar
Google found a funny way to show the anonymous persons who open a document in Google Drive. Instead of only using different colors for each person, Google Drive associates each person with an animal, so you'll see things like "anonymous anteater", "anonymous moose", "anonymous chupacabra", "anonymous axolotl", "anonymous kraken", "anonymous gopher", "anonymous jackalope". Google also uses special icons for each animal.

For the moment, this only works for PDF files, photos, videos and other files that can't be edited using Google's apps.


To test this feature, click a random photo from this folder and click the "open" button.




Here's the list: alligator, anteater, armadillo, auroch, axolotl, badger, bat, beaver, buffalo, camel, chameleon, cheetah, chipmunk, chinchilla, chupacabra, cormorant, coyote, crow, dingo, dinosaur, dolphin, duck, elephant, ferret, fox, frog, giraffe, gopher, grizzly, hedgehog, hippo, hyena, jackal, ibex, ifrit, iguana, koala, kraken, lemur, leopard, liger, llama, manatee, mink, monkey, narwhal, nyan cat, orangutan, otter, panda, penguin, platypus, python, pumpkin (sic!), quagga, rabbit, raccoon, rhino, sheep, shrew, skunk, slow loris, squirrel, turtle, walrus, wolf, wolverine, wombat. Missing anything?

{ Thanks, Yu-Hsuan Lin. }

Baca Selengkapnya ....

Blogger Comments Powered by Google+

Posted by Unknown 0 komentar
I don't know if you've notice, but this blog's comments look different. That's because I've switched to the new Google+ Comments feature for Blogger.


The upgraded commenting system preserves the existing comments, but the future comments require a Google+ account. That means, visitors can no longer post comments anonymously, using an OpenID account or using a Google account that hasn't been upgraded to Google+. When posting a comment, visitors can also share it on Google+. The new commenting system doesn't just show the comments posted on Blogger, it also shows all the Google+ messages that link to the post and their comments.

Just like Disqus, Google+ Comments shows by default the best comments and there's an option to show the most recent comments. It's not clear how Google determines the top comments, but the number of +1s could be one of the signals. You can also restrict the comments to the people from your Google+ circles.

Bloggers will notice some other changes: the comment management feature from Blogger is no longer available and you can only manage comments for each post. That's a significant downside, especially if you receive a lot of comments. When one of your posts receive new comments, you'll see a notification in the Google bar and you'll get an email notification. I haven't found a way to disable these notifications, not even from the Google+ settings page.

How to enable Google+ Comments if you have a Blogger blog? "Google+ Comments is available for Blogger users who have created a Google+ profile and connected it with their blog. If you haven't upgraded your Blogger profile to a Google+ profile and would like to, you can start the process by clicking the Google+ tab on the Blogger dashboard. Once your blogs are linked to a Google+ profile, a new 'Use Google+ Comments' setting will be displayed on the Google+ tab of your blog," explains Google. If your blog has a heavily modified template, you may need to reset widgets or use the code from this page.

There are additional limitations: Google+ Comments is not available for private blogs and for blogs with adult content. This means that the old commenting system will continue to be available as long as Blogger supports these kinds of blogs. You can always disable Google+ Comments and go back to the legacy Blogger commenting system.

It's important to point out that Google+ Comments are embedded as an iframe (the URL starts with https://plusone.google.com/_/widget/render/comments) and the comments are no longer included inside the Blogger page. Google manages to index content from iframes, but the change could affect your Google rankings.

Another interesting thing: it's the first time when the official Google Blog has comments.

Some early thoughts:

* Blogger is now more relevant, it's less likely that it will be discontinued in the next few years

* Blogger finally has a modern commenting system

* Google+ Comments will be available for other blogging platforms

* "sign in with Google+" will make Google+ even more popular as an identity service.

Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android populer.