Here's my activity.java:

package lars.browser;

import lars.browser.dagensbilde;
import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;


public class BrowserActivity extends Activity {
    /** Called when the activity is first created. */
    public void onClick(View v) {
        if (v.getId() == R.id.dagens_button) {
View dagens_button = findViewById(R.id.dagens_button);
dagens_button.setOnClickListener((OnClickListener) this);
Intent i = new Intent(this, dagensbilde.class);
startActivity(i);

And here's my main.xml

<?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="fill_parent"
    android:background="@color/background"
    android:orientation="horizontal"
    android:padding="30dip" >

<LinearLayout
    android:orientation="vertical"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:layout_gravity="center">
<TextView
    android:text="@string/main_title"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_gravity="center"
    android:layout_marginBottom="25dip"
    android:textSize="24.5sp"/>


<Button
    android:id="@+id/nyeste_button"
    android:layout_width="265dp"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:text="@string/nyeste_text"
    android:textSize="20sp" />


    <Button
        android:id="@+id/dagens_button"
        android:layout_width="265dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="@string/dagens_text"
        android:textSize="20sp" />

    <Button
        android:id="@+id/måneds_button"
        android:layout_width="265dp"
        android:layout_height="wrap_content"
        android:text="@string/måneds_text" 
        android:layout_gravity="center"
        android:textSize="20sp"/>
    <Button
        android:id="@+id/alltid_button"
        android:layout_width="265dp"
        android:layout_height="wrap_content"
        android:text="@string/alltid_text" 
        android:layout_gravity="center"
        android:textSize="20sp"/>
<Button
    android:id="@+id/aboutdev_button"
    android:layout_width="265dp"
    android:layout_height="wrap_content"
    android:text="@string/aboutdev_button"
    android:layout_gravity="center"
    android:textSize="20sp"/>
 </LinearLayout> 
</LinearLayout>


Please tell me if i need anything.

Den onsdag den 13. juni 2012 01.52.28 UTC+2 skrev cellurl:
>
> Get Jetboy working first.
> http://www.udemy.com/write-and-publish-an-app-for-your-android-smartphone/
> It will teach you a lot and only take 1hour.
>
>
>
>
>
> On Tue, Jun 12, 2012 at 5:50 PM, Justin Anderson <magouyaw...@gmail.com>wrote:
>
>> Without seeing your code there is no way of knowing...
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>> On Thu, Jun 7, 2012 at 1:21 PM, Lars <lars.breum...@gmail.com> wrote:
>>
>>> Hello
>>> I am new at this site and new at developing.
>>> The first activity in my application has 5 buttons, every one of them 
>>> should(at som point when I get it done) lead to a web page using the 
>>> "webview" wigdet. Eclipse does'nt show any errors or mistakes in the code 
>>> ANYWHERE.
>>>
>>> BUT, when I try to run the app on my phone it only shows my background 
>>> color and the applications name.
>>>
>>> This is what Eclipse shows (picture is taken with my phone) in main.xml
>>>
>>> <https://lh6.googleusercontent.com/-Eh4Mstm6RTI/T9D-o7D2CsI/AAAAAAAAEdo/mNDvt-qH0k8/s1600/IMG_20120607_211404.jpg>
>>> This is what my phone shows: as you can see theres something wrong. but 
>>> what? please help me. Thanks, Lars.
>>>
>>> <https://lh6.googleusercontent.com/-hF-KuNJLMk8/T9D9_s8LeXI/AAAAAAAAEdY/_iry-jMFNv4/s1600/Screenshot_2012-06-07-19-05-04.png>
>>>  
>>> -- 
>>> 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+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>  -- 
>> 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+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to