i am new to this forums , i have tried a sample android application using MOTODEV studio , i am not able to find few things , like how to setup the action for the button and if i setup an action how do i open the layout while i click over the button , i am having six button ,now i want if i click over one button it should load the layout or should be send to next screen to display content.
Please guide with example or same code so that learning is easy.
On Wed, Aug 8, 2012 at 6:48 PM, pankajdev <pankajde...@gmail.com> wrote:
> Hi ,
> i am new to this forums , i have tried a sample android application using
> MOTODEV studio , i am not able to find few things , like how to setup the
> action for the button and if i setup an action how do i open the layout
> while i click over the button , i am having six button ,now i want if i
> click over one button it should load the layout or should be send to next
> screen to display content.
> Please guide with example or same code so that learning is easy.
> with regards
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
}); On Wednesday, August 8, 2012 8:18:57 AM UTC-5, pankajdev wrote:
> Hi ,
> i am new to this forums , i have tried a sample android application using > MOTODEV studio , i am not able to find few things , like how to setup the > action for the button and if i setup an action how do i open the layout > while i click over the button , i am having six button ,now i want if i > click over one button it should load the layout or should be send to next > screen to display content.
> Please guide with example or same code so that learning is easy.
hey parthi, thanks but actually i look forward for where to pass , if u have sample code do share else see the below code is used to achieve is this right , now can you suggest if i have loaded another layout how can i come back to the previous one or the main one , i am now trying with the back button can u suggest.
public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);
final Button button = (Button) findViewById(R.id.button1); button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Perform action on click
setContentView(R.layout.aboutus); } });
final Button buttonhome = (Button) findViewById(R.id.button1); buttonhome.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Perform action on click
On Wednesday, 8 August 2012 19:18:05 UTC+5:30, parthi wrote:
> Hi pankajdev, just pass onclicklistener > use getId values... > and pass resources layout...
> On Wed, Aug 8, 2012 at 6:48 PM, pankajdev <panka...@gmail.com<javascript:> > > wrote:
>> Hi ,
>> i am new to this forums , i have tried a sample android application using >> MOTODEV studio , i am not able to find few things , like how to setup the >> action for the button and if i setup an action how do i open the layout >> while i click over the button , i am having six button ,now i want if i >> click over one button it should load the layout or should be send to next >> screen to display content.
>> Please guide with example or same code so that learning is easy.
>> with regards
>> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-d...@googlegroups.com<javascript:> >> To unsubscribe from this group, send email to >> android-developers+unsubscribe@googlegroups.com <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en
On Wednesday, 8 August 2012 19:40:28 UTC+5:30, bob wrote:
> Button b = findViewById(R.id.button);
> b.setOnClickListener(new OnClickListener() {
> @Override
> public void onClick(View v) {
> // Button clicked
> }
> });
> On Wednesday, August 8, 2012 8:18:57 AM UTC-5, pankajdev wrote:
>> Hi ,
>> i am new to this forums , i have tried a sample android application using >> MOTODEV studio , i am not able to find few things , like how to setup the >> action for the button and if i setup an action how do i open the layout >> while i click over the button , i am having six button ,now i want if i >> click over one button it should load the layout or should be send to next >> screen to display content.
>> Please guide with example or same code so that learning is easy.
} On Wednesday, August 8, 2012 9:37:41 AM UTC-5, pankajdev wrote:
> @bob thanks your reply is correct but i am now little step ahead and look > forward for further help , please see
> On Wednesday, 8 August 2012 19:40:28 UTC+5:30, bob wrote:
>> Button b = findViewById(R.id.button);
>> b.setOnClickListener(new OnClickListener() {
>> @Override
>> public void onClick(View v) {
>> // Button clicked
>> }
>> });
>> On Wednesday, August 8, 2012 8:18:57 AM UTC-5, pankajdev wrote:
>>> Hi ,
>>> i am new to this forums , i have tried a sample android application >>> using MOTODEV studio , i am not able to find few things , like how to setup >>> the action for the button and if i setup an action how do i open the layout >>> while i click over the button , i am having six button ,now i want if i >>> click over one button it should load the layout or should be send to next >>> screen to display content.
>>> Please guide with example or same code so that learning is easy.