yashsingh1/xdaforums huggingface dataset:
[Android Software Development] IAmCorbin:
I am in the process of learning android development and am trying to understand how to use compound controls.

Here is the control I have created:

package net.iamcorbin.dialer;

public class DialPadView extends LinearLayout implements OnClickListener {
Button buttons[];
TextView display;

public DialPadView(Context context) {
super(context);

String infService = Context.LAYOUT_INFLATER_SERVICE;
LayoutInflater li;
li = (LayoutInflater)getContext().getSystemService(infService);
li.inflate(R.layout.dialpad, this, true);

this.display = (TextView)findViewById(R.id.displayNumber);
this.display.setText("Dial a Number");

this.buttons[0] = (Button)findViewById(R.id.button0);
this.buttons[1] = (Button)findViewById(R.id.button1);
this.buttons[2] = (Button)findViewById(R.id.button2);
this.buttons[3] = (Button)findViewById(R.id.button3);
this.buttons[4] = (Button)findViewById(R.id.button4);
this.buttons[5] = (Button)findViewById(R.id.button5);
this.buttons[6] = (Button)findViewById(R.id.button6);
this.buttons[7] = (Button)findViewById(R.id.button7);
this.buttons[8] = (Button)findViewById(R.id.button8);
this.buttons[9] = (Button)findViewById(R.id.button9);
this.buttons[10] = (Button)findViewById(R.id.buttonStar);
this.buttons[11] = (Button)findViewById(R.id.buttonPound);

for(Button button : this.buttons) {
button.setOnClickListener(this);
}
}

public void onClick(View v) {
switch(v.getId()) {
case R.id.button0:
this.display.append("0");
break;
case R.id.button1:
this.display.append("1");
break;
case R.id.button2:
this.display.append("2");
break;
case R.id.button3:
this.display.append("3");
break;
case R.id.button4:
this.display.append("4");
break;
case R.id.button5:
this.display.append("5");
break;
case R.id.button6:
this.display.append("6");
break;
case R.id.button7:
this.display.append("7");
break;
case R.id.button8:
this.display.append("8");
break;
case R.id.button9:
this.display.append("9");
break;
case R.id.buttonStar:
this.display.append("*");
break;
case R.id.buttonPound:
this.display.append("#");
break;
}
}
}

I don't really understand how to add this to my main layout. I thought you could add it in xml with a node like:

<net.iamcorbin.dialer.DialPadView android:id="+id/dialpad" /> (forum would not let me post the "at" symbol here, thought I was trying to post a link)

but adding this line causes the program to crash upon loading.

I figure I'm just making a stupid beginner mistake, could someone please correct me?

Thanks,

~Corbin
[Android Software Development] IAmCorbin:
can anyone help? I am really eager to move forward with development, but I'm still stuck trying to get custom compound controls working.
[Android Software Development] IAmCorbin:
I've been consulting the documentation(developer.android.com/guide/topics/ui/custom-components.html#compound) and if I change the main.xml to this:

<LinearLayout
class="net.iamcorbin.dialer.DialPadView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>

the application runs but the custom DialPadView is no where to be found

Here is the dialpad.xml file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="schemas.android.com/apk/res/android" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="+id/displayNumber" android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout android:layout_width="wrap_content"
android:layout_height="40dp">
<Button android:id="+id/button1" android:text="string/button1"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
<Button android:id="+id/button2" android:text="string/button2"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
<Button android:id="+id/button3" android:text="string/button3"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content"
android:layout_height="40dp">
<Button android:id="+id/button4" android:text="string/button4"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
<Button android:id="+id/button5" android:text="string/button5"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
<Button android:id="+id/button6" android:text="string/button6"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content"
android:layout_height="40dp">
<Button android:id="+id/button7" android:text="string/button7"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
<Button android:id="+id/button8" android:text="string/button8"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
<Button android:id="+id/button9" android:text="string/button8"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content"
android:layout_height="40dp">
<Button android:id="+id/buttonStar" android:text="string/buttonStar"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
<Button android:id="+id/button0" android:text="string/button0"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
<Button android:id="+id/buttonPound" android:text="string/buttonPound"
android:layout_width="fill_parent" android:layout_height="fill_parent"></Button>
</LinearLayout>
</LinearLayout>
("at" symbols removed)
[Android Software Development] IAmCorbin:
I also just tried loading the dialpad.xml layout as the main layout just to make sure there were no errors being thrown there.

setContentView(R.layout.dialpad);

loaded just fine.
[Android Software Development] IAmCorbin:
[SOLVED]

Oops...it was all a stupid java mistake:

Button buttons[];

changed to

Button buttons[] = new Button[12];

fixed the problem
[EVO 4G Q&A, Help & Troubleshooting] xusxmarinesx:
I downloaded and installed the new sprint update and I know it closes root is there anyway I can downgrade and make my phone rootable again
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
no -
[EVO 4G Q&A, Help & Troubleshooting] Albaholic:
not yet anyway. A little reading on your part will go a long way on these forums.
[Droid Incredible Q&A, Help & Troubleshooting] jeaton313:
I wanted to know if we could update clockwork recovery threw rom manager currently have 2.0.13 the new one is 2.0.21.
[Droid Incredible Q&A, Help & Troubleshooting] Namolas:
Just update and boot to recovery and see if it stuck or not. If I remember correctly it doesn't stick right now because we don't have NAND root. I had to use the unrevoked flash tool for both updates so far otherwise it just downloads but never flashes.

I am conditioning my batterystats.bin right now so I cannot try it, sorry.
[Droid Incredible Q&A, Help & Troubleshooting] Cameron_S:
You can boot into once you flash it with Rom Manager but once you reboot it its gone, just tried it.
[Droid Incredible Q&A, Help & Troubleshooting] rpearl:
Ok I'll give my clarification again:

"Fully rooted" is a meaningless term. You have superuser access on your phone, that means you have root.

An additional level of protection that HTC has added to their phones is a NAND-flash chip which is locked by a memory protection unit. This is below the OS level, and thus below superuser. You can still have full root access to your phone, and not have access to this chip. The reflash tool unlocks NAND and reflashes the recovery partition.

The only way to unlock this at the hardware level is an exploit, or by changing hboot such that it does not initiate the NAND protection. We are still hesitant to flash hboot. If you mess up reflashing recovery, you have an unlimited number of chances to get it right. If you mess up reflashing hboot, you have a permanent brick.

Thus, since the recovery partition is protected by this hardware-level memory protection unit, ROM manager cannot reflash the recovery partition. You people seem to say that this is "not fully rooted" so "it is not sticking". Whatever. Yes, it won't "stick". No, this doesn't actually matter. You get *precisely* the same effect by updating in ROM manager. If there is a critical update that requires flashing, we will make sure that our users obtain this update.

Ryan

unrevoked team
[Droid Incredible Q&A, Help & Troubleshooting] rynosaur:
Thanks for the clarification.

Why, may I ask, is your team so hesitant to flash hboot? This was integral part to development on the G1/Dream until this year, when certain saavy devs developed workarounds for flash-storage limitations (i.e., no ROMs above 64mb). Many of us took the DangerSPL leap and our G1s lived to run 30mb+ extra partition space. Why the hesitancy on Unrevoked's part, then? Are the chances very good that the procedure will brick/trip nand-security to lock-up the device -- a.k.a. bricking it?

I'm curious, any info is appreciated.
[Droid Incredible Q&A, Help & Troubleshooting] rpearl:
There appears to be error-code-correction which we triggered last time we tried flashing hboot, resulting in binny's brick.

We think we can try again, and we will soon enough.
[Droid Incredible Q&A, Help & Troubleshooting] jeaton313:
Can you flash the new recovery with unrevoked flash tool.
[Droid Incredible Q&A, Help & Troubleshooting] fader01:
I flashed the Clockwork Mod Recovery to 2.0.21 and when I reboot Rom Manager says I have 2.0.21 still. It seems to have stuck for me?
[Droid Incredible Q&A, Help & Troubleshooting] ksizzle9:
Try turning off the phone and then booting into recovery. Im prtty sure it wont stick then
[Droid Incredible Q&A, Help & Troubleshooting] fader01:
I have rebooted, went into recovery, wiped the device, loaded a rom, and installed Rom Manager again. It still says it has 2.0.21. Maybe Rom Manager is just reading it wrong?
[Droid Incredible Q&A, Help & Troubleshooting] intenselyinsane:
My clockwork recovery has stuck as well. I also updated it with rom manager and its still there. Has been for a couple weeks now.
[Droid Incredible Q&A, Help & Troubleshooting] sdorn77:
Don't reboot into recovery from rom manager. Physically turn off the phone by using the power button or pulling the battery, and then boot into recovery by holding down power and volume down and then selecting recovery. Then check your version of recovery.
[Droid Incredible Q&A, Help & Troubleshooting] intenselyinsane:
I have booted through rom manager, pulled the battery, used quick boot recovery and used adb reboot recovery. All have the same one.
[Droid Incredible Q&A, Help & Troubleshooting] giantcrazy:
Ryan-

Thanks for the detailed reply - it's the first explanation I've read regarding the protected NAND memory and makes perfect sense. I appreciate your taking the time out to 'splain it.
[Droid Incredible Q&A, Help & Troubleshooting] jeaton313:
You can flash the new recovery on rom manager it works.
[Droid Incredible Q&A, Help & Troubleshooting] SerialKilla:
Agreed 100000000000% - Much Appreciated!
[Droid Incredible Q&A, Help & Troubleshooting] x1208x:
doesn't make sense... you flashed it to something you wanted? And it shows its the one you flashed? so whats the problem? 2.0.2.1 is the most current version.
[Droid Incredible Q&A, Help & Troubleshooting] fader01:
Well if you read the whole thread you would see others saying it doesnt stick. So I was puzzled as to why it seemed to stick for me.

But after I went into Clockwork and looked at the version there I understood what everyone was saying ... Rom Manager is saying its the newest version but in realitity it is the old version still.
[Droid Incredible Q&A, Help & Troubleshooting] x1208x:
Oh i see what you are saying. weird. tweet koush!
[Droid Incredible Q&A, Help & Troubleshooting] larsrya8:
He knows it doesn't work... it can't work for reasons already explained by rpearl. It also doesn't matter that it doesn't work.

Please don't make Koush cranky with unnecessary noise.
[Desire General] gringooo:
During a call, when I have somebody calling me on other line, and if try to put first call on hold to answer second one, my phone freezes.

Can anybody help me with this, or I will have to do hard reset?

This problem showed up few weeks ago, so it might have to do something with some applications.
[Desire General] rowanparker:
I have something similar, when I'm on a call and I get a second call. When I end the second call I have no way of getting back to the first call.
[HD2 General] murgers:
Hi,

I have a corrupt received text message that I cannot delete in the conventional way (i have tried deleting the message, the thread, the contact etc) but it just stays there. it has no sent or received date associated with it so it just sits as my first text message and right winds me up. any suggestions?

Many Thanks

Murg
[HD2 General] rp-x1:
Is it from 129 or a similar short number?
[HD2 General] murgers:
No it's just a normal message from my gf that's just gotten corrupted somehow (possibly to do with myphone) where are text messages stored, can I force it to be deleted somehow?
[HD2 General] rp-x1:
They *might* be in

'\Windows\Messaging'

or

\cemail.vol

It might also be emails instead.
[EVO 4G Themes and Apps] Greenfieldan:
I've recently discovered how cool having an 8 MP camera with me all the time is, and I wanted to know if people knew of cool apps that added something to the phones picture taking ability (editing pictures, taking them, etc).

Also, my friend and I are kind of in a battle of who can take better pictures. He has an iphone, so I kind of don't want to lose this one haha. He's actually good at photography, so I'm already starting behind the 8 ball...but I'm determined!
[EVO 4G Themes and Apps] fdot:
fx camera is nice for pre-made filters.
[EVO 4G Themes and Apps] AcIdC0R3:
I agree, fx Camera and another one is PicSay Pro but it's more on the lines of after effects.
[EVO 4G Themes and Apps] Geniusdog254:
PicSay Pro is actually really useful. I've used it to show off the capabilities of Android a lot, and I really like it
[EVO 4G Themes and Apps] AcIdC0R3:
I like sending my ex her own picture with different jacked up quotations. Some are funny as ever. haha
[EVO 4G Themes and Apps] 702DROID:
post them lol :D
[EVO 4G Themes and Apps] AcIdC0R3:
Here's one...
[EVO 4G Themes and Apps] AcIdC0R3:
Here's one of my cat. It's kind of funny...

Sent from my EVO 4G using the XDA app.
[EVO 4G Themes and Apps] Greenfieldan:
I'm really liking the toy camera feature in fx camera. Is it me, or do the shots seem to have a slightly lower resolution than the standard camera?
[EVO 4G Themes and Apps] Freelancerx:
if you want full rez with a bunch of really cool filters try vignette, frankly i think its the best camera app out there
[EVO 4G Themes and Apps] robfactory:
FX is amazing, but you might want to try out vignette.

it can get complex with all of the filters and effects, but it's pretty cool
[EVO 4G Themes and Apps] Geniusdog254:
Ha nice PicSay work there. I was at a wedding the other day and there were little hats on the table, so of course I got creative with my fingers, the hats, and my Evo :D

Here's the results lol

Tiny finger man coulda been better, but the mob one worked out really well lol
[EVO 4G Themes and Apps] AcIdC0R3:
The one with the bloodshot eyes. LOL
[EVO 4G Themes and Apps] Rayne:
+1 for Vignette. A good camera/pic app was the one thing I was missing coming from the iPhone - where I loved Hipstamatic.

Vignette is awesome.
[EVO 4G Themes and Apps] scirio:
Try "Camera 360". It's great, has a refined UI that really makes it feel like a full featured camera and not just some app. Works great.
[EVO 4G Themes and Apps] AcIdC0R3:
I was thinking about installing this one. I guess I will now. Thanks bro.
[EVO 4G Themes and Apps] Greenfieldan:
Really? I tried it and wasn't super impressed. Maybe I missed something though; what do you really like about it? (although I might go back just because it does seem to be able to take high resolution shots)
[EVO 4G Themes and Apps] Freelancerx:
well the fact that its full rez, and the fact that certain filters need to have certain subjects in order to look good like this for example:

this is another one i did while messing around with the london filter

anyway i think the default camera does a good job by itself,
[EVO 4G Themes and Apps] josue85:
Frelancerx, you have a great eye for photography, those pics look amazing.
[EVO 4G Themes and Apps] beamscout:
+1 for vignette. Its has some really nice presets as well as custom features. Better than iphones hipstamatic imho.
[EVO 4G Themes and Apps] Greenfieldan:
Agreed. Those are incredible!
[EVO 4G Themes and Apps] rhymestars:
camera 360 ultimate has simulate dslr hd exposure

it also has a crap ton of filters and a random combo filter button which has provided me with great depth of field shots.

Just remember to set your metering to spot so you can focus the object and not the backround. Also cut the saturation down a notch and the sharpness up. ALWAYS BE SURE TO HAVE YOUR FLASH ON AUTO. I also toggle between an balance of 200 and 400 depending on how much natural light is in the room. Intall the the sd card read ahead mod and your evo picture will be medium quality.

Nothing beats the tru hd 720 p Recording of my Samsung vibrant.

Samsung really did a good job with the custom codecs and software plus the hummingbird processor is now where its at. Snapdragon is now the INTEL of android.
[EVO 4G Themes and Apps] crstfr:
lmoa classic!...every woman's one liner~ ... wink
[Hero, G2 Touch General] nellisere:
hey, 1st post, dont know where to put it, well i flashed ezhero, and dont like the AOSP camera app, so i removed it and installed the htc one, now, when i try to use it, it FC's, please help, thanks
[HD2 Windows Mobile 6.5 Themes and Apps] dunnboy9984:
y isnt my weather toggel switch working , when i push it nothing happens it doesnt switch over to green to show its on
[HD2 Windows Mobile 6.5 Themes and Apps] davej:
And...?

What were you expecting to happen? All it does is turn off the weather animation.

Davej ;)
[HD2 Windows Mobile 6.5 Themes and Apps] dunnboy9984:
i knw that but when i push it , it wont turn the switch to green like all the others. and the its raining but its showing sun .. its like it froze and the main screen
[HD2 Windows Mobile 6.5 Themes and Apps] dunnboy9984:
on the main screen
[HD2 Windows Mobile 6.5 Themes and Apps] davej:
Set up

Be sure you have set up your connection to the internet correctly and have ensured that the settings in the weather tab are correct for you to download and update your location and weather.

The switch does not take you to the weather tab BUT simply turns on/off the weather animation on the home screen.

It sounds like two separate issues.

Davej
[HD2 Windows Mobile 6.5 Themes and Apps] watcher64:
I see what he is saying, my toggle , says on when animation is ON and Off when it is turned off , he says his never changes ....

Could be the toggle graphic on your phone just does not do that, but more likely your weather is screwed some how .....

Make sure it is setup and is getting updates , that is more important than the anim, if that is not working then the anim is a moot point ...
[HD2 Windows Mobile 6.5 Themes and Apps] zkid2010:
If you haven't turned on "enable my location" within the weather tab OR if you have removed the weather tab from the slider icons, it won't work. Just toggles nothing.
[HD2 General] aptness leadership:
Does anyone here think it possible, or perhaps even worth developing a windows MOBILE 7 rom for the HD2? Perhaps based on windows embedded mobile? Even better, does anyone care?
[HD2 General] SecrtAgentMan:
After seeing the Android rom working for about 5 minutes I'm more excited for that than Win7.

I wouldn't doubt if there are people making a Win7 ROM for the HD2.
[HD2 General] Fif23:
Am I the only one who thinks that Winmo 6.5 Energy + Modded manila > Android ? Energy Winmo just looks and feels better... Androis is overhyped, but I may need to play with it a bit more.
[HD2 General] aptness leadership:
I don't care for windows phone 7, but about the time wm 6.1 was released, i got excited for wm7. i thought it would be awesome. instead we get wp7. crap.
[HD2 General] freeincolorado:
+1

I was with Android from 1.0 to 1.5 to 1.6 to 2.1 on my g1 and having switched to WinMo I do not want to go back. I am not intetested in Android or Phone 7 for my Hd2.
[HD2 General] sirphunkee:
I have to agree with freeincolorado and silencer, android just doesn't cut the mustard. I finally loaded it on my TP2 and have been playing with it all weekend, and while there's a few things about it that I wish winmo had, I was still very relieved when popped my sim back in my HD2 this afternoon.

As for the original topic of this post, I feel extrememly confident that someone will try to to get wp7 working on the HD2, if only for the accomplishment. Even if it's never tried with any other existing phone, the HD2's hardware should certainly be capable, if the drivers etc can be made to work with it.
[HD2 General] ryan562:
I like both OS of android and win mo. Both are open source and highly customizable. I just preordered the T-Mobile Vibrant but will be keeping my HD2 for work and will end up flashing some cool new roms on it.

I've been sticking with android because unlike Win Mo 6.5x, it's not a dying platform. It's completely on the rise with the upcoming Froyo and Gingerbread updates. Google has also promised even more updates in the future. I see LOADS of potential. The Android market is constantly growing along with XDA development e.g., CyanogenMod, etc..

But don't get me wrong I love Win Mo. It's by far and truely open source vs. android. I was surprised that I can already do things on my stock HD2 that a stock and unrooted android device can't (saving apps to sd, overclock the cpu, playing Flash etc). But with these forthcoming android OS updates, these features will finally be included.
[HD2 General] maxpower097:
Well we got great devs here on our side so were gonna be just fine. I see a modified Win 6.75 coming out once WP7 is out. Taking key features and benefits from WP7 and merging them into Win6.5. Hell I'm running Kumars Classic rom and haven't had to reboot in like 10 days now. Then I see dual boot with an android port that works good but has a few bugs. Then I dream of possibly WINXP or a good UBUNTU running as a 3rd or dare it 4th os. With all the tablets coming out we may have many more OS options and choices floating around.
[HD2 General] mr1ncred1ble:
winmo 6.5 crushes android 1.6 imo...I Had a g1 running 1.6 and absolutely loved it, great device and great os..i use winmo 6.1 on a motorola mc55 for work so i thought i would hate the hd2 but compared to the motorola cliq which was my only android "upgrade" option from tmous at the time, the hd2 ran circles so I went with it and got the xt for the wife to compare...no contest hd2 ftw...she's still waiting for 2.1, moto delayed it again she's still at 1.5! haha . I do miss some android features but i just look at that huge screen and forget all about it...
[HD2 General] aptness leadership:
i realize that many people want windows phone 7 for hd2, but this thread is really about windows mobile 7. I'm thinking photon. do you think thats possible?
[HD2 General] TechnoHippie:
First off - Windows Mobile is NOT open source.

As for WM7 - I'm sure it will be ported to the HD2. The real question is will the GPS, bluetooth, and camera work with it properly - which is my complaint about Android. If those 3 things don't also work along with everything else (I *suppose* I could live without the FM radio) - then it's pointless as far as I'm concerned.