hideip's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
17 (0.02 per day)
Joined:
10-January 11
Profile Views:
338
Last Active:
User is offline Jan 10 2012 05:40 PM
Currently:
Offline

Previous Fields

Country:
VN
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0
Icon   hideip has not set their status

Posts I've Made

  1. In Topic: How to receive from Broadcast Receiver

    Posted 14 Dec 2011

    that's great. thank H3R3T1C very much. :^:
  2. In Topic: book for mobile programming

    Posted 14 Dec 2011

    I am a novice too but I studied some thing. I don't know you want to study about J2ME, WinCE, or Android ? :rolleyes:
  3. In Topic: How to receive from Broadcast Receiver

    Posted 14 Dec 2011

    in SecondClass

    public static int colorstring=0xffffff00;//Yellow
    chbRed = (CheckBox)findViewById(R.id.CheckBoxRed);//    #FF0000
    	        chbRed.setonclickListener(new onclickListener()
    	        {
    	             
    	            public void onclick(View v)
    	            {
    	                if(chbRed.isChecked())
    	                {
                                     colorstring = 0xff0000ff;
    				 chbRed.setChecked(false);
    				 chbGreen.setChecked(false);
                             }
    
    


    in FirstClass

    tvAnh.setTextColor(SecondClass.colorstring);
    
    


    but why when i click Checkbox the color in tvAnh ( TextView ) wasn't change ??/ :balloon:
  4. In Topic: How to receive from Broadcast Receiver

    Posted 14 Dec 2011

    i don't know how to use interfaces in java. :balloon:
  5. In Topic: How to receive from Broadcast Receiver

    Posted 13 Dec 2011

    hi H3R3T1C,
    I have 3 activity

    TabActivity
    public class TheSwitcherActivity extends TabActivity 
    {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState)
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
        
        
    	    TabHost tabHost = getTabHost();
    	    TabHost.TabSpec spec;
    	    Intent intent;
    	    
    	    intent = new Intent().setClass(this,FirstClass.class);
    	    spec = tabHost.newTabSpec("The Switcher").setIndicator("The Switcher").setContent(intent);
    	    tabHost.addTab(spec);
    	    
    	    intent = new Intent().setClass(this,SecondClass.class);
    	    spec = tabHost.newTabSpec("Option").setIndicator("Option").setContent(intent);
    	    tabHost.addTab(spec);
        }
    }
    
    

    FirstClass
    public class FirstClass extends   Activity
    {
                 String Color;
    	     TextView tvAnh;
    	    @Override protected void onCreate(Bundle savedInstanceState)
    	{
    	    super.onCreate(savedInstanceState);
    	    setContentView(R.layout.tab_text);
    	    tvAnh = (TextView)findViewById(R.id.textViewAnh);
    	 
    	     ///////////////////////////////////////////////////////////////////////
                //I read some book and i make class NhanMauTuSecondClass extends broadcastReceiver, but it can't work
    	    IntentFilter filter = new IntentFilter();
    	    NhanMauTuSecondClass receiver = new NhanMauTuSecondClass();
    	    registerReceiver(receiver, filter);
    	    Color = receiver.color;    
    	    ///////////////////////////////////////////////////////////////////////
    
    



    public class SecondClass extends Activity
    {
             Intent i = new Intent("Color");
             protected void onCreate(Bundle savedInstanceState) 
    	{
    		// TODO Auto-generated method stub
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.tab_text2);
    		
    		chbRed = (CheckBox)findViewById(R.id.CheckBoxRed);//	#FF0000
    		chbRed.setonclickListener(new onclickListener() 
    		{
    			
    			public void onclick(View v) 
    			{
    				if(chbRed.isChecked())
    				{
    					chbBlue.setChecked(false);
    					chbGreen.setChecked(false);
    					i.putExtra("Color", "#FF0000");
    					sendBroadcast(i);
    				}
    				
    			}
    		});
    }
    
    
    


    i want when i change state of checkbox in secondclass, the TextView in Firstclass will change color ??? :( :(

My Information

Member Title:
New D.I.C Head
Age:
21 years old
Birthday:
October 4, 1991
Gender:
Location:
Viet Nam
Interests:
naruto
Full Name:
Kinh Luân
Years Programming:
1
Programming Languages:
C and C++

Contact Information

E-mail:
Private
Yahoo:
Yahoo  nkluan_gl

Friends

hideip hasn't added any friends yet.

Comments

hideip has no profile comments yet. Why not say hello?