master.bennett's Profile User Rating: -----

Reputation: 16 Tradesman
Group:
Contributors
Active Posts:
41 (0.06 per day)
Joined:
09-September 11
Profile Views:
1,251
Last Active:
User is offline Aug 08 2012 06:36 AM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
Playstation
Your Car:
Who Cares
Dream Kudos:
100
Icon   master.bennett has not set their status

Posts I've Made

  1. In Topic: Eclipse & J2ME

    Posted 16 Feb 2012

    @ guido-granobles: thanks, that helped
  2. In Topic: Android, Part III: Dynamic Layouts

    Posted 4 Feb 2012

    I know this thread is old but felt no need to create a new topic.

    I have been recently going through some android tutorials and just in case anyone wants to get this example using xml for the layout, here's the code below:

    The Java activity file:

    package org.pg;
    
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.EditText;
    import android.widget.LinearLayout;
    import android.widget.TextView;
    
    public class PlaygroundActivity extends Activity {
    
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
      }
    
      public void addName(View view) {
        String name = ((EditText) this.findViewById(R.id.txt_name)).getText().toString();
        
        TextView tv = new TextView(this);
        tv.setText(name);
        
        LinearLayout ll = (LinearLayout) this.findViewById(R.id.linear_main);
        ll.addView(tv);
      }
    
    }
    


    The xml layout file:

    <?xml version="1.0" encoding="utf-8"?>
    <ScrollView 
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    	
    	<LinearLayout 
    	    android:layout_width="fill_parent"
    	    android:layout_height="fill_parent"
    	    android:orientation="vertical"
    	    android:id="@+id/linear_main" >
    	
    	    <TextView  
    	  		android:layout_width="fill_parent" 
    	  		android:layout_height="wrap_content" 
    	  		android:text="Enter a name:" />
    	
    	    <EditText
    		  android:layout_width="fill_parent"
    		  android:layout_height="wrap_content"
    		  android:id="@+id/txt_name" />
    	    
    	
    	    <Button
    		  android:layout_width="fill_parent"
    		  android:layout_height="wrap_content"
    		  android:id="@+id/btn_confirm"
    		  android:text="Add Name"
    		  android:onclick="addName" />
    		    	
    	</LinearLayout>
    	
    </ScrollView>
    
    
  3. In Topic: ICT Scrapped in UK secondary Schools

    Posted 12 Jan 2012

    Yeah, I had to go through the the awful ICT system. Fortunately I was able to take Computing at A-levels. You really do not learn nothing and in quite a lot of the cases, the students probably know more than the teachers
  4. In Topic: Android Tutorial Requests

    Posted 11 Jan 2012

    A tutorial on how to create a client application which uses authentication (securely if possible) to connect to a web server running on a PC.

    This will be to - get data, update data on client, and write data back to the server.

    A sample server implementation would be a bonus

    Thanks
  5. In Topic: Codeacademy.com, Good Idea or Disaster for Programmers?

    Posted 6 Jan 2012

    To be honest I'm all for it. For some people, it may surprise them when they try to take on a complex project and might open people's eyes that programming is not as easy and may actually make people value those who can hack it in industry more.

    You can never gain a true appreciation of something unless you try it for yourself.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
London, UK
Interests:
Football (soccer)
Economics
Movies
Technology
Programming Languages:
Java SE/EE | SQL | C++ | HTML | CSS | XML | JavaScript

Contact Information

E-mail:
Click here to e-mail me

Friends

master.bennett hasn't added any friends yet.

Comments

master.bennett has no profile comments yet. Why not say hello?