ad728

Thursday, December 14, 2017

AIDE Tutorial - 44 Rotate Animation

AIDE Tutorial - 44 Rotate Animation

Watch the Video Below

MainActivity.Java
package com.kcgroup.animrotate;
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.view.animation.*;
public class MainActivity extends Activity
{ @Override

    protected void onCreate(Bundle savedInstanceState)    {        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);    }
public void cw(View v){ImageView image=(ImageView)findViewById(R.id.mainImageView);
Animation an=AnimationUtils.loadAnimation(getApplicationContext(),R.anim.rotate_clockwise);
image.startAnimation(an);}
public void ccw(View v){ImageView image=(ImageView)findViewById(R.id.mainImageView);
Animation an=AnimationUtils.loadAnimation(getApplicationContext(),R.anim.rotate_countercw);image.startAnimation(an);}}
Main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
   android:orientation="vertical" >
    <ImageView
android:layout_weight="4"
android:id="@+id/mainImageView"
        android:src="@drawable/ic_launcher"
        android:layout_width="match_parent"      android:layout_height="wrap_content" />
<Button
android:onClick="cw"
android:text="Clock Wise"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:onClick="ccw"
android:text="Counter Clock wise"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Rotate_clockwise.xml
<?xml version="1.0" encoding="utf-8"?>
<setxmlns:android="http://schemas.android.com/apk/res/android"
>
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1000"
android:repeatCount="2"
android:interpolator="@android:anim/cycle_interpolator"/></set>
Rotate_CounterClockWise.xml
<?xml version="1.0" encoding="utf-8"?>
<setxmlns:android="http://schemas.android.com/apk/res/android"
>
<rotate
android:fromDegrees="360"
android:toDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1000"
android:repeatCount="2"
android:interpolator="@android:anim/cycle_interpolator"/></set>
Share:

Wednesday, December 13, 2017

AIDE Tutorial - 45 Slide Animation

AIDE Tutorial - 45 Slide Animation

Watch the Video Below
MainActivity.java
package com.kcgroup.animslide;
import android.app.*;
import android.os.*;
import android.widget.*;
import android.view.animation.*;
import android.view.*;
public class MainActivity extends Activity
{    @Override
    protected void onCreate(Bundle savedInstanceState)    {        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);    }
public void top(View v){
ImageView image=(ImageView)findViewById(R.id.mainImageView);
Animation an=AnimationUtils.loadAnimation(getApplicationContext(),R.anim.silde_top);
image.startAnimation(an);}
public void bottom(View v){ImageView image=(ImageView)findViewById(R.id.mainImageView);
Animation an=AnimationUtils.loadAnimation(getApplicationContext(),R.anim.silde_bottom);
image.startAnimation(an);}
public void right(View v){
ImageView image=(ImageView)findViewById(R.id.mainImageView);
Animation an=AnimationUtils.loadAnimation(getApplicationContext(),R.anim.slide_right);
image.startAnimation(an);}
public void left(View v){ImageView image=(ImageView)findViewById(R.id.mainImageView);
Animation an=AnimationUtils.loadAnimation(getApplicationContext(),R.anim.slide_left);
image.startAnimation(an);}}


Main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <ImageView
android:layout_weight="4"
android:id="@+id/mainImageView"
        android:src="@drawable/ic_launcher"
        android:layout_width="match_parent"        android:layout_height="wrap_content" />
<Button
android:onClick="top"
android:text="Top"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:onClick="bottom"
android:text="Bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:onClick="right"
android:text="Right"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:onClick="left"
android:text="Left"
android:layout_width="wrap_content"
android:layout_height="wrap_content" /></LinearLayout>


Slide_bottom.xml
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true">
<scale
android:duration="2000"
android:fromXScale="1"
android:fromYScale="0"
android:toXScale="1"
android:toYScale="1"
android:interpolator="@android:anim/linear_interpolator"/>
</set>

Slide_left.xml
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true">
<scale
android:duration="2000"
android:fromXScale="1"
android:fromYScale="1"
android:toXScale="0"
android:toYScale="1"
android:interpolator="@android:anim/linear_interpolator"/>
</set>

Slide_right.xml
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true">
<scale
android:duration="2000"
android:fromXScale="0"
android:fromYScale="1"
android:toXScale="1"
android:toYScale="1"
android:interpolator="@android:anim/linear_interpolator"/>
</set>

Slide_top.xml
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true">
<scale
android:duration="2000"
android:fromXScale="1"
android:fromYScale="1"
android:toXScale="1"
android:toYScale="0"
android:interpolator="@android:anim/linear_interpolator"/>
</set>
Share:

Sunday, December 10, 2017

AIDE Tutorial - 49.1 Context Menu on ListView

AIDE Tutorial - 49.1 Context Menu on ListView

Watch the Video Below



Main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
    <ListView
android:id="@+id/mainTextView"
android:layout_width="wrap_content"      android:layout_height="wrap_content" />
</LinearLayout>
Main Activity.java
package com.kcgroup.CM;
import android.app.*;
import android.os.*;
import android.widget.*;
import android.view.*;
import android.view.ContextMenu.*;
public class MainActivity extends Activity
{ListView list;
    @Override
    protected void onCreate(Bundle savedInstanceState)   {       super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
list=(ListView)findViewById(R.id.mainTextView);

String[] name={"A","B","C","D"};
ArrayAdapter adapter=new ArrayAdapter(this,android.R.layout.simple_list_item_1,name);
list.setAdapter(adapter);
registerForContextMenu(list);    }
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo)
{ // TODO: Implement this method
super.onCreateContextMenu(menu, v, menuInfo);
menu.setHeaderTitle("Select Action");
menu.add(0,v.getId(),0,"Call");
menu.add(0,v.getId(),0,"SMS");
menu.add(0,v.getId(),0,"VideoCall"); }
@Override
public boolean onContextItemSelected(MenuItem item)
{ if(item.getTitle()=="Call"){
Toast.makeText(this,"Call is Clicked",Toast.LENGTH_SHORT).show();
} else
if(item.getTitle()=="SMS"){
Toast.makeText(this,"SMS is Clicked",Toast.LENGTH_SHORT).show();
} else
if(item.getTitle()=="VideoCall"){ Toast.makeText(this,"VideoCall is Clicked",Toast.LENGTH_SHORT).show(); }
// TODO: Implement this method
return true; }}
Share:

AIDE Tutorial - 49 Context Menu on TextView

AIDE Tutorial - 49 Context Menu on TextView

Watch the Video Below



Main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">
    <TextView
android:id="@+id/mainTextView"
android:textSize="25dp"
 android:text="Long Press to see context menu"        android:layout_width="wrap_content"       android:layout_height="wrap_content" />
</LinearLayout>
MainActivity.java
package com.kcgroup.CM;


import android.app.*;
import android.os.*;
import android.widget.*;
import android.view.*;
import android.view.ContextMenu.*;
public class MainActivity extends Activity
{TextView text;
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
text=(TextView)findViewById(R.id.mainTextView);
registerForContextMenu(text); }
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo)

{ // TODO: Implement this method
super.onCreateContextMenu(menu, v, menuInfo);
menu.setHeaderTitle("Select Action");
menu.add(0,v.getId(),0,"Call");
menu.add(0,v.getId(),0,"SMS");
menu.add(0,v.getId(),0,"VideoCall");}
@Override
public boolean onContextItemSelected(MenuItem item)
{ if(item.getTitle()=="Call"){
Toast.makeText(this,"Call is Clicked",Toast.LENGTH_SHORT).show();} else
if(item.getTitle()=="SMS"){ Toast.makeText(this,"SMS is Clicked",Toast.LENGTH_SHORT).show(); } else
if(item.getTitle()=="VideoCall"){ Toast.makeText(this,"VideoCall is Clicked",Toast.LENGTH_SHORT).show();
} // TODO: Implement this method
return true;}}

Share:

Friday, December 8, 2017

AIDE Tutorial - 48 PopUp Menu

AIDE Tutorial - 48 PopUp Menu


Watch the Video Below



Main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">
    <Button
android:onClick="popup"
        android:text="PopUp"
        android:layout_width="wrap_content"        android:layout_height="wrap_content" /> </LinearLayout>

Java
package com.kcgroup.popup; import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.widget.PopupMenu.*;
public class MainActivity extends Activity
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
public void popup(View v){
PopupMenu pop=new PopupMenu (this,v);
MenuInflater mi=pop.getMenuInflater();
mi.inflate(R.menu.popup, pop.getMenu());
pop.show();
pop.setOnMenuItemClickListener(new OnMenuItemClickListener(){
@Override
public boolean onMenuItemClick(MenuItem aaa)
{ if(aaa.getItemId()==R.id.call){ Toast.makeText(getApplicationContext(),"Call is clicked",Toast.LENGTH_SHORT).show();}
if(aaa.getItemId()==R.id.sms){ Toast.makeText(getApplicationContext(),"SMS is clicked",Toast.LENGTH_SHORT).show();}
if(aaa.getItemId()==R.id.video){ Toast.makeText(getApplicationContext(),"Video Call is clicked",Toast.LENGTH_SHORT).show();}
// TODO: Implement this method
return true; }});}}
Create a new folder and add pop.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android">
   
    <item
        android:id="@+id/call"
        android:title="Call"/>
<item
        android:id="@+id/sms"
        android:title="SMS"/>
<item
        android:id="@+id/video"
        android:title="Video Call"/>
   
</menu>
Share:

Saturday, November 11, 2017

AIDE Tutorial - 40 Calendar View

AIDE Tutorial - 40 Calendar View

Watch the Video Below


Add the code below in Main.xml
  <CalendarView
        android:id="@+id/calendarView"
      android:layout_width="wrap_content"
     android:layout_height="wrap_content"
  android:layout_centerHorizontal="true"
        android:layout_centerVertical="true" />
Share:

Tuesday, November 7, 2017

Revenue hits

How to monetize your Facebook page||RevenueHits and Chitika?

How to monetize your Facebook page||RevenueHits and Chitika ************************
Sign Up Referral Link Revenue Hits: https://www.revenuehits.com/lps/pubref/?ref=@RH@CP-ebWdYEPxlm9h7C1OXOA Chitika: https://chitika.com/publishers/apply/?refid=shyamkumarkc20 *************************
Related Videos How To Maximize RevenueHits Earning https://youtu.be/ceN5-2I9CJA 

Stay Connected
 Like My Facebook Page http://bit.ly/2oZqBCy Follow me on Twitter http://bit.ly/2q0pFOu Visit my blog http://bit.ly/2p8rYtP Subscribe: http://bit.ly/2uFbSuT
How to monetize your Facebook page||RevenueHits and Chitika? How to monetize your Facebook page||RevenueHits and Chitika?
Share:

Total Pageviews

Sponsor

Sponsor

ad300