Monday, 5 November 2018

Michael Dertouzos age death quotes

Born            November 5, 1936
                        Athens, Greece

Death       August 27, 2001 (aged 64)
                 Boston, United States


Age          64 (1936–2001)


Quotes     

We made a big mistake 300 years ago when we separated technology and humanism. ... It's time to put the two back together.

— Michael Dertouzos, Scientific American, July 1997

The potential of the modern information age seemed overshadowed at every turn by the ancient forces that separate the rich from the poor.

— Michael Dertouzos, January 1999

Introduction

Michael Leonidas Dertouzos  was a Greek professor in the departments of Electrical Engineering and Computer Science at the Massachusetts Institute of Technology and Director of the M.I.T. Laboratory for Computer Science (LCS) from 1974 to 2001.

Wednesday, 31 October 2018

Halloween Makeup

Here I am providing Halloween Makeup app url.Once see your photo in that app



https://play.google.com/store/apps/details?id=com.best.photo.app.halloween.makeup


Introduction

Halloween costumes
are costumes worn on or around Halloween, a festival  on October 31.   Halloween comes from Scotland in 1585, but they may pre-date this. There are many references to the custom during the 18th and 19th centuries in the Celtic countries of Scotland, Ireland, Mann and Wales. It has been suggested that the custom comes from the Celtic festivals of Samhain and Calan Gaeaf, or from the practise of "souling" during the Christian observance of Allhallowtide. Wearing costumes and mumming has long been associated with festivals at other times of the year, such as on Christmas.[1] Halloween costumes are traditionally based on frightening supernatural or folkloric beings. However, by the 1930s costumes based on characters in mass media such as film, literature, and radio were popular. Halloween costumes have tended to be worn mainly by young people, but since the mid-20th century they have been increasingly worn by adults also.

Friday, 5 January 2018

Horizontal gridview in android easy to put

 
 
 
 
<HorizontalScrollView 
android:layout_width="match_parent" 
android:layout_marginTop="650dp"android:layout_marginLeft="20dp" 
android:layout_marginRight="20dp" 
android:layout_height="fill_parent"
 android:id="@+id/horizontalScrollView">
 <FrameLayoutandroid:layout_width="1000dp" 
 android:layout_height="wrap_content">
 <LinearLayout
 android:id="@+id/linearLayout_gridtableLayout" 
android:layout_width="500dp" 
android:layout_marginLeft="0dp" 
android:layout_height="100dp"
 android:orientation="horizontal">
<GridViewandroid:id="@+id/gridView"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"android:layout_margin="4dp" 
android:columnWidth="60dp"android:gravity="center"android:numColumns="5" 
android:horizontalSpacing="1dp"android:scrollbarAlwaysDrawHorizontalTrack="true"
 android:scrollbarAlwaysDrawVerticalTrack="true"android:scrollbars="horizontal" 
android:stretchMode="none"android:verticalSpacing="1dp">
 </GridView> </LinearLayout> </FrameLayout>
</HorizontalScrollView>
 
 
 
 
 
 

Tuesday, 2 January 2018

Gridview with two texts in android

Gridview with two texts in android

Reply with comment




Manefest:

<?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"    package="com.example.admin.grid1"
<application 
 android:allowBackup="true" 
 android:icon="@mipmap/ic_launcher" 
 android:label="@string/app_name" 
 android:supportsRtl="true" 
 android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
 

activity_main:

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 
 xmlns:android="http://schemas.android.com/apk/res/android" 
 xmlns:tools="http://schemas.android.com/tools" 
 android:layout_width="match_parent" 
 android:layout_height="match_parent"
 <GridView xmlns:android="http://schemas.android.com/apk/res/android" 
 android:id="@+id/gridview" 
 android:layout_width="match_parent" 
 android:layout_height="wrap_content" 
 android:background="#cccccc" 
 android:horizontalSpacing="1dp" 
 android:numColumns="3" 
 android:stretchMode="columnWidth" 
 android:verticalSpacing="1dp" />
</RelativeLayout>
   

grid_layout:

<?xml version="1.0" encoding="utf-8"?> 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
 android:layout_width="match_parent" 
 android:layout_height="match_parent" 
 android:orientation="vertical" 
 android:gravity="center" 
 android:background="#fff" 
 android:padding="15dp" 
 
<TextView 
 android:layout_width="wrap_content" 
 android:layout_height="wrap_content" 
 android:text="Medium Text" 
 android:id="@+id/textView" 
 android:layout_gravity="center_horizontal" /> 
<TextView 
 android:id="@+id/grid_item_label" 
 android:layout_marginTop="5dp" 
 android:layout_width="wrap_content" 
 android:layout_height="wrap_content" 
 android:text="Medium Text" 
 android:textColor="#555" /> 
</LinearLayout>

MainActivity: 


public class MainActivity extends AppCompatActivity {

    String[] web = {
            "one",
            "one",
            "one",
            "one",
            "one",
            "one",
            "one",
            "one",
            "one",
            "one"

    } ;
    String[] web2 = {
            "two",
            "two",
            "two",
            "two",
            "two",
            "two",
            "two",
            "two",
            "two",
            "two"

    } ;




    @Override 
 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Img1 adapter = new Img1(MainActivity.this,web,web2);

        GridView gridview = (GridView) findViewById(R.id.gridview);


        gridview.setAdapter(adapter);
        gridview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View v,
                                    int position, long id) {
                if(position==0)
                {
                    Toast.makeText(MainActivity.this, "add", Toast.LENGTH_SHORT).show();
                }
                if(position==1)
                {

                }
                if(position==2)
                {

                }
                if(position==3)
                {

                }
                if(position==4)
                {

                }
                if(position==5)
                {

                }
            }
        });
    }
}


Img1:


public class Img1 extends BaseAdapter
{
    private Context mContext;
    private final String[] web;
    private final String[] web2;
    public Img1(Context c, String[] web,String[] web2 )
    {
        mContext = c;
        this.web=web;
        this.web2=web2;
    }



    @Override    public int getCount()
    {

        return web.length;
    }
    @Override    public Object getItem(int position)
    {
        return position;
    }
    @Override    public long getItemId(int position)
    {
        return 0;
    }
    @Override    public View getView(int position, View convertView, ViewGroup
            parent)
    {
        LayoutInflater inflater = (LayoutInflater)
                mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View gridView;
        if (convertView == null)
        {
            gridView = new View(mContext);
            // get layout from mobile.xml 
 gridView = inflater.inflate(R.layout.grid_layout, null);
            // set value into textview 
 TextView textView = (TextView)gridView.findViewById(R.id.grid_item_label);
 TextView textView2 = (TextView)gridView.findViewById(R.id.textView);

            textView.setText(web[position]);
            textView2.setText(web2[position]);
            // set image based on selected text

        }
        else 
 {
            gridView = (View) convertView;
        }
        return gridView;
    }
}