CodingJavascript help

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  koswix  
 To:  Peter (BOUGHTONP)     
37533.21 In reply to 37533.20 
No, Google called dibs on that one.


GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  Wattsy (SLAYERPUNX)   
 To:  koswix     
37533.22 In reply to 37533.21 
Google is teh evil, you just wait! They will have chickens with lasers on their heads before long.

Web Shite Mail Me

0/0
 Reply   Quote More 

 From:  koswix  
 To:  Wattsy (SLAYERPUNX)      
37533.23 In reply to 37533.22 
As long as they still do regular firmware updates for Android, who cares?


GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  Wattsy (SLAYERPUNX)   
 To:  koswix     
37533.24 In reply to 37533.23 
My desire is lacking the 2.2 goodness, therefore they are evil.

Web Shite Mail Me

0/0
 Reply   Quote More 

 From:  koswix  
 To:  Wattsy (SLAYERPUNX)      
37533.25 In reply to 37533.24 
Soon, my precious.


GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Wattsy (SLAYERPUNX)      
37533.26 In reply to 37533.24 
http://www.phonesreview.co.uk/2010/06/21/htc-desire-android-2-2-ota-update-on-its-way/


GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  koswix     
37533.27 In reply to 37533.21 
Google is more of just a non-evil empire.

If they were really geniuses they would have created a proper GUI API for Android, instead of the ridiculous shit they actually used.
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Peter (BOUGHTONP)     
37533.28 In reply to 37533.27 

I want to make a really simple app for Android, just three or 4 input boxes which then give a mathematical answer when you press submit.

 

How hard should that be?



GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  koswix     
37533.29 In reply to 37533.28 
It shouldn't be hard at all.

But I'd recommend doing it with HTML and using PhoneGap (or similar) to convert it, to avoid really icky XML.



Here's a quick example - if you want to do this with Android:




The Android UI example code for that is this:
XML code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <TextView
        android:id="@+id/label"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Type here:"/>
    <EditText
        android:id="@+id/entry"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@android:drawable/editbox_background"
        android:layout_below="@id/label"/>
    <Button
        android:id="@+id/ok"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/entry"
        android:layout_alignParentRight="true"
        android:layout_marginLeft="10dip"
        android:text="OK" />
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toLeftOf="@id/ok"
        android:layout_alignTop="@id/ok"
        android:text="Cancel" />
</RelativeLayout>


All those silly android:layout_ bits do my head in.

A far nicer (though still not perfect) way would have been:
XML code:
<RelativeLayout layout="width:fill;height:fill">
 
	<Text id="label" text="Type Here:" />
 
	<Edit id="entry" />
 
	<Button id="ok" text="OK" />
 
	<Button id="cancel" text="Cancel" />
 
	<Layout>
		#label
		{
			width:fill; height:wrap;
		}
		#entry
		{
			width:fill; height:wrap;
			below:#label;
		}
		#ok
		{
			width:wrap; height:wrap;
			below:#id;
			alignRight:parent;
			marginLeft:10dip;
		}
		#cancel
		{
			width:wrap; height:wrap;
			toLeftOf:#ok;
			alignTop:#ok;
		}
	</Layout>
 
</RelativeLayout>



Which could be compared to a HTML+CSS equivalent:

HTML code:
<body style="width:100%;height:100%">
 
	<label id="label">Type Here:</div>
 
	<input type="text" id="entry" />
 
	<button id="ok">OK</button>
 
	<button id="cancel">Cancel</button>
 
	<style>
		#label
		{
			width:100%; height:auto;
			display:block;
		}
		#entry
		{
			width:100%; height:auto;
			display:block;
		}
		#ok
		{
			width:auto; height:auto;
			float:right; clear: right;
			margin-left:10px;
		}
		#cancel
		{
			width:auto; height:auto;
			float:right; clear: none;
		}
	</style>
 
</body>



But anyway, that's just me ranting and not really what you asked. :S
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Peter (BOUGHTONP)     
37533.30 In reply to 37533.29 
Tell you what, you make it for me and I'll buy you a pint at Teh Invasion.


GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Peter (BOUGHTONP)     
37533.31 In reply to 37533.29 
Oh, and your link doesn't work :@


GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  koswix     
37533.32 In reply to 37533.31 
Ooops. Fixed it. Was just phonegap.com anyhow.

Tell me what you want, and if it will only take a few minutes I'll maybe do it tonight or tomorrow. :)
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Peter (BOUGHTONP)     
37533.33 In reply to 37533.32 
Aww, bless.

Input the following:

Number of beers in a pack

Size of beers in ml

ABV of beer

Price of pack of beer

output:

Price of beer per litre

Price per can/bottle

units of alcohol per litre (10 ml of alcohol = 1 unit)

price of of a unit of alcohol.


GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  koswix     
37533.34 In reply to 37533.33 

Bahahahaha :D

 

I want that app when Pete makes it!


0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  koswix     
37533.35 In reply to 37533.33 
Now /that's/ a useful app. Why didn't anyone think of it before?

bastard by name, bastard by nature

0/0
 Reply   Quote More 

 From:  koswix  
 To:  ANT_THOMAS     
37533.36 In reply to 37533.34 

This spread sheet has my calculations in it. Including letting you input how many units it takes to get you pissed, and then calculating how much it'll cost to get you pissed :$

 

Right, Off to the shops to try and work out of Lidl's Stella offer is better value than Tesco's Carlsberg Export offer.



GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  Mouse  
 To:  koswix     
37533.37 In reply to 37533.36 
Hahah ace. Tramp Equation App.

Roses are bollocks, Violets are crud, I hate bloody flowers, And much prefer mud.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  koswix     
37533.38 In reply to 37533.33 
That seems a piece of piss. :)

Would it make sense to have an "add to favourites" for the first 3, so you also can pick common ones from dropdown and just enter price?
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Peter (BOUGHTONP)     
37533.39 In reply to 37533.38 

Probably not cos prices change so much. But I dunno.

 

What might be fun is the ability to put one in and jsut adding it to a list with a simple delete function, so you can puta few in and work out which is cheapest without having to remember it all in your drunken brain.

 

If you do it you're a star and I will give you something nice but I don't know what yet. x



GIVE ME MEAT! :@ msg:37418.1
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  koswix     
37533.40 In reply to 37533.39 
Or you could have some drinks in a list but for alcohol % reasons so you don't have to either remember the percentage or look for it and enter it.

0/0
 Reply   Quote More 

Reply to All  
 

1–20  21–40  41–47

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats