yashsingh1/xdaforums huggingface dataset:
[Android Studio] 1nstan7riod:
I am trying to get my button to create a new textview but its not doing it. The code works but its doesnt create the textview.

public class SampleActivity extends MainActivity implements View.OnClickListener {

int counter = 0;

private LinearLayout linearLayout;

private Button button;

[MENTION=439709]override[/MENTION]

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

linearLayout = (LinearLayout) findViewById(R.id.linear_layout);

button = (Button) findViewById(R.id.add_button);

button.setOnClickListener(this);

}

[MENTION=439709]override[/MENTION]

public void onClick(View view) {

if(view.getId() == button.getId()){

counter++;

TextView textView = new TextView(SampleActivity.this);

textView.setText("TextView " + counter);

linearLayout.addView(textView);

}

}

}

and in my activity_main

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:id="@+id/linear_layout"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical">

<Button

android:id="@+id/add_button"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Add TextView" />

</LinearLayout>
[Android Studio] 8bitdev:
Have you tried setting the layout by calling setLayoutParams on the textview?
[Android Studio] alphascript:
Try this:

TextView textView = new TextView(SampleActivity.this);

textView.setText("TextView " + counter);

textView.setLayoutParams(new LinearLayout.LayoutParams(

LinearLayout.LayoutParams.FILL_WRAP_CONTENT,

LinearLayout.LayoutParams.FILL_WRAP_CONTENT));

linearLayout.addView(textView);
[One (M9) General] clsA:
Well the M9 has been out for one month now and I'm getting the feeling that HTC has lost in popularity this round. It's still too early to tell for sure how many M8 and M7 (Note 4) users will be coming over to the M9. But from the general activity in these forums, it's not happening very quickly.

I pre ordered my M9 Developer Edition from HTC the day it was announced and sold my M8 with no regrets. I'm Very happy with the Developer support we have so far, and am looking forward to the upcoming year with the M9.

The point of this thread is to get a handle on just how many actual M9 owners are visiting the forums and how well the M9 is doing over all.

If you have an M9 please leave a short reply and number your device (example I'll be #1 the first person to reply would be #2 and so on) So that way when you check the newest post in this thread you'll know how many M9 owners have visited this thread.

If you have more than one M9 number all of them, Thanks

Roll Call

clsA - #1 M9 Developer Edition
[One (M9) General] DeadPotato:
I'm not quite sure, the android development forums seem active to me, anyway:

DeadPotato - #2 M9 Factory Unlocked Edition
[One (M9) General] davidtm0:
#3 Sprint edition, bone stock (so far)

Sent from Tapatalk on either my HTC One M9 or Tab4 10.1, it kinda depends
[One (M9) General] aka120:
aka120 - #4 M9 AT&T variant
[One (M9) General] augie7107:
Unlocked - 5
[One (M9) General] gffmac:
#6 UK unlocked
[One (M9) General] caanda45:
#7 unlocked by me and s-off

Had a M8, sold it, got a S6 really liked it, but had a update on it and it broke google now for use on any screen...anyways got the M9, like it but not really huge leaps and bounds different than the M8...one point of interest is that I am LeeDroid custom rom and he also has a M8 custom rom and he and others have pointed out that the M8 has a much brighter screen than the M9...

It is well built the M9 (I think compared to anything else out there) but rather boring in features...So Leedroid is the only thing that is making me keep the phone....
[One (M9) General] Android The Greek:
Android the Greek. At&t converted to Dev edition
[One (M9) General] general X:
#9 Rogers m9 unlocked s-off sold m8 for 380 and got my m9 the day it came out bought the first one Rogers sold on oshawa Ontario, and on the latest leedroid 7.4.0 best rom and devolper a Android geek could ask for cheers
[One (M9) General] markwebb:
#10

Developer edition s-off and returning in a week. Very disappointed. Can't stand mediocre camera, mediocre battery, overheating and throttling. Screen is not top notch. Nothing special about this phone.

Sorry HTC, you lost on this one.
[One (M9) General] Duncan1982:
#11 bye bye but your comments are not factual nor are they testament to what is a great device.

1)Battery life has been on the better side of average for me & developers have further improved.

2) Camera is shaping up nicely and now with Raw support.

3)overheating well only time I have experienced is when updating (flashing new ROM, or updating it).

4) Screen is nice more so with Kcal

5)Best audio experience

6)Performance is just fantastic

7)Brilliant developer support & roms/Kernels, its just the beginning.

Oh and again #11 unlocked, UK

Enjoy you S6 or whatever you decide to opt for dude :)
[One (M9) General] Stephen:
Moderator Information,

Thread has been closed. Off-Topic threads are not aloud in the forums. Please use the Off Topic forum for threads like this.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] slicetwo:
If I flash cm12 onto my phone currently running TouchWiz 4.4.2, will it update the bootloader and such, preventing me from going back to TW if I need to do so?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] mrrocketdog:
ROMs rarely if ever contain bootloaders or modems. and if they do , it should be in the OP. i would suggest ALWAYS reading the OP as they usually contain useful information. on some ROMs it will have you upgrade bootloader/modem to be able to function properly.

also you might want to read thru some of the last posts to see if people are having any issues and/or any fixes needed.

i would think you should be fine to be able to go back to TW if you want. as i'm sure youre aware its always wise to make a backup of your current ROM.

just curious , which bootloader and modem are you on ?

"all i can really do , is stay out of my own way and let the will of heaven be done"
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] slicetwo:
Baseband is ne4
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] mrrocketdog:
well if your bootloader is also NE4 , which it probably is ; then i would think youre good to go. :)

"all i can really do , is stay out of my own way and let the will of heaven be done"
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] slicetwo:
Probably. Thanks!
[Nexus 6 Q&A, Help & Troubleshooting] GeneticJim:
Hey guys. I am still waiting for my N6 in the mail but is there any way to move to the n6 easy? I am not going to root so Ti backup is out.
[Nexus 6 Q&A, Help & Troubleshooting] joshm.1219:
Tap & Go.... www.gottabemobile.com/2014/10/19/android-5-0-tap-go-restores-your-phone-in-minutes/
[Nexus 6 Q&A, Help & Troubleshooting] NLBeev:
On the note 3 the option Backup data to Google servers must be enabled.

When you add to N6 the same Google account you used on the note 3, apps will be transferred.

Using the N6 you will discover battery drain caused by the amoled display. All Google apps have a white background and no option to change.

That's why my N6 is rooted and has an other kernel (Franco kernel).

It increased battery life to at least one day.
[Nexus 6 Q&A, Help & Troubleshooting] GeneticJim:
Thanks for the info! Every smart phone I had so far had the same screen tech with the nexus 6 having the best quality display. The only thing i will miss from this note 3 is the 10,000 mAh battery i for from zero lemon.
[8125, K-JAM, P4300, MDA Vario ROM Development] LeoArg:
Hi

I need all codec (audio and video) for Wizard g3 with WM6 Crosswoard.

Divx, Xvid, MPEG and other.

Thank you to all!! :-)
[8125, K-JAM, P4300, MDA Vario ROM Development] TheWizzard2203:
Hehe, 'WM6 Crosswoard', what version is that? :D :D :p ;)
[8125, K-JAM, P4300, MDA Vario ROM Development] LeoArg:
Crossbow Reloaded v1.7

Thank ;-)
[8125, K-JAM, P4300, MDA Vario ROM Development] dwny:
Use TCPMP (free) or CORE Player (commercial)

Whatever these can't play, you can install the plug-ins from where you get the programs
[G3 Q&A, Help & Troubleshooting] AlexFory:
Hi.

I have an LG G3 AT&T model,and today I restarted the phone, and the phone stopped at AT&T logo. I search on google and I make hard recovery than the phone stopped at LG Logo, I search again on google and I found " How to Unroot/Unbrick LG G3! " . I made everything who was in that tutorial . At Step 9 says like this ". After checking your files, it will say “READY!!”. When you see that, unplug your G3 micro-USB cable, wait about 3 seconds, then plug it back in." but that 'READY' doesn't appear .

LOOk what appears. imgur . com/FKk9aQF
[One (M8) Q&A, Help & Troubleshooting] subcola:
Okay let me start by saying that I have 3 backups of my entire phone made through TWRP. Yesterday I was configuring some flashable ZIPs to install a simple app like SMSgo through recovery. I then installed the ZIP. It was successful but the app was nowhere to be found so I decided to restore a backup. I restored the newest one, when I booted I ran into some problems, I was stuck in a loop of lock screen and boot animation. I then searched the web for solutions. On some forums somebody suggested to wipe internal storage and flash boot.emmc.win from my backup through fastboot. I did so and when I booted my phone was factory fresh and okay. But I didn't have my numbers and sms so I restored a backup... BAD idea. My phone was optimizing apps as I booted, it failed near the end, System UI has stopped it said and then threw me on setup screen without on screen buttons. I tried to restore every single backup I had, the same story with everyone, the best result I got was that it optimized all aps and then crashed system UI.

I went on web and searched for TWRP backups that fit my CID HTC__032 and restored. As I'm typing this I'm running factory fresh 4.4.4 from backup and only OTA I can download is 70mb fix. I didn't update yet cuz I dont have stock recovery.

I am currently not rooted as this downloaded backup wasn't but all backups I made myself are rooted. I have also unlocked bootloader and S-ON running TWRP.

What should i do now? I want to get to stock (preferably get one of my backups working) so I will be able to receive OTAs

The downloaded back is for HTC__032cid, 3.28.401.6 version as it was one of few which had working download links.

http://forum.gsmhosting.com/vbb/f485/htc-m8-collection-stock-backups-1882892/

Also worth mentioning that when I rooted before all this happened I had problems with crashing of TV app and I couldn't browse internal storage that I solved with:

adb shell

su

restorecon -FR /data/media/0
[One (M8) Q&A, Help & Troubleshooting] xunholyx:
Here's a stock recovery download.

Here's a stock rooted backup. I'm not sure if that's really what you are looking for though.

You could also try running the 4.16.401.10 RUU to update. That would clean up your phone so that you can start with a fresh slate. The RUU download is here.

After the RUU, you should be able to restore your nandroids. Probably after the OTAs as well.
[One (M8) Q&A, Help & Troubleshooting] subcola:
As I'm typing this I have successfully flashed stock recovery and made an OTA update with my phone from 3.28.401.6 on 4.16.401.10, what concerns me is that I cannot access internal storage and TV app is crashing.

Same problem as my previous post:

Also I can't turn on WIFI after OTA so I'll try to run that RUU and report if the problem fixes itself. I don't really want to mess with root unless I have to.

EDIT: RUU fails with error code 155: UNKNOWN ERROR, shall I just do what used to work before? or you have other ideas?

Edit2: Did a factory reset and all problems are gone. Just obe more thing, the mobile signal seems weak, is it possible that my radio got messed up? Can I restore radio from one of my backups ?
[Amazon Fire Phone] hoanphu:
I know people run into this all the time with other phones, but I'm not sure how to fix it with this particular phone. I keep it in my pocket all the time and the little hole right beside the camera lens must be letting in pocket dust. The quality of the camera pictures are much lower and the camera has a hard time gauging light now.

Any one have any idea how to clean it out? I've tried blowing compressed air at various angles into the hole but it doesn't really help. Maybe disassembling the phone is the only way, but I haven't been brave enough to try it yet.

EDIT:

So fixing the problem was relatively easy, although it may void your warranty. You simply need to remove the two small T3 screws on the bottom of the phone and open the phone by pulling the phone open. There is a video demonstrating the disassembly (just search youtube or google for "Amazon Fire Phone Teardown Review" by iFixit Video). [remove spaces below for direct link, i'm a newbie so can't post links yet]

www . you tube . com / watch ? v = d5k-AWEeWqo

As you open it, there will be a small sticker that gets detached that proves to Amazon that you opened it and will likely void your warranty. If you are ok with that, you simply clean out the clear lens cover and reassemble by snapping the phone back together, starting with the top of the phone.
[Amazon Fire Phone] clawdyu:
I have got the exact same problem. I don't know what to do. Picture quality is much lower, they are now a little bit overexposed and washed out.

I was thinking to send it back to warranty, but I don't know if it qualifies for warranty.

If you can open yours and clean your camera, please post instructions here.

Thanks

Edit:

I have just seen a Youtube video and it appears you only have to unscrew the two little bottom screws to remove the back cover.
[Amazon Fire Phone] chalx:
I'm in the same boat after just a little over a month of usage.
[Amazon Fire Phone] hoanphu:
Solved, see original post
[Amazon Fire Phone] crackalakin:
Just did it. Worked perfectly. Make sure you take the SIM card out!!! I almost cracked the case trying to open it with the SIM card in. Cleaned the lens cover with a swab. Pictures are clear again. Yea!!
[Amazon Fire Phone] YRP19:
any permanent solution?

Cleaning the lens will be a temporary solution.

The dust will continue to enter inside when you keep your phone in your pocket..

Please let me know about a permanent solution for the same.

I m unable to use the fire phone's camera since then.

Any rubber piece to seal the entrance of the dust over the camera?? ???
[Galaxy S 4 Q&A, Help & Troubleshooting] v4vyshakh:
I tried to upgrade my GT-I9500 to Official Lollipop firmware using Odin. It showed a FAIL and when I tried to restart the device, it shows, Firmware upgrade encountered an issue. Please select recovery mode in Kies. I tried entering into recovery mode in Kies by entering the Model Number and Serial Number (S/N). But, it shows, GT-I9500 can't be initialized. I tried on Kies and Kies3. I tried using different USB cables and USB ports. The phone is not going into Recovery mode. Please help me!!!

I tried using Odin v7, v9 and v10. Odin showed this message:

<ID:0/004> Added!!

<OSM> Enter CS for MD5..

<OSM> Check MD5.. Do not unplug the cable..

<OSM> Please wait..

<OSM> I9505XXUGNH2_I9505PLSGNH1_I9505XXUGNH2_HOME.tar.md5 is valid.

<OSM> Checking MD5 finished Sucessfully..

<OSM> Leave CS..

<ID:0/004> Odin v.3 engine (ID:4)..

<ID:0/004> File analysis..

<ID:0/004> SetupConnection..

<ID:0/004> Initialzation..

<ID:0/004> Get PIT for mapping..

<ID:0/004> Firmware update start..

<ID:0/004> sbl1.mbn

<ID:0/004> NAND Write Start!!

<ID:0/004> sbl2.mbn

<ID:0/004> sbl3.mbn

<ID:0/004> rpm.mbn

<ID:0/004> aboot.mbn

<ID:0/004> tz.mbn

<ID:0/004> boot.img

<ID:0/004> recovery.img

<ID:0/004> system.img.ext4

<ID:0/004> Complete(Write) operation failed.

<OSM> All threads completed. (succeed 0 / failed 1)

Please help me!!
[Galaxy S 4 Q&A, Help & Troubleshooting] krasCGQ:
Hi,

You can try flashing firmware with a .pit file.
[Galaxy S 4 Q&A, Help & Troubleshooting] Lennyz1988:
Why are you flashing I9505XXUGNH2 on a I9500?? You CANNOT flash I9505 firmware on a I9500.
[Galaxy S 4 Q&A, Help & Troubleshooting] v4vyshakh:
oops! I pasted the wrong log by mistake. The pasted log was for I9505. But, the issue is the same when I tried flashing the correct firmware for I9500. Can you please find out a solution? I'm totally stuck! :confused:
[Galaxy S 4 Q&A, Help & Troubleshooting] v4vyshakh:
Hey, thankyou for your reply. Will you please elaborate about the actual process? I don't have proper knowledge about .pit file. Please help!
[Galaxy S 4 Q&A, Help & Troubleshooting] Lennyz1988:
It's still a drivers/pc/port/cable problem.

You are not using a virtual machine are you?
[Galaxy S 4 Q&A, Help & Troubleshooting] v4vyshakh:
I tried using different USB cables and on different USB ports. Drivers are correctly installed. Other phones are getting detected without any issues.

I'm not using a Virtual Machine. Thanks!
[Galaxy S 4 Q&A, Help & Troubleshooting] Mentu12:
I had the same problem, try to use different pc like i did.
[Galaxy S 4 Q&A, Help & Troubleshooting] v4vyshakh:
Shall I try using the .pit file? Can that be useful by any means?
[Galaxy S 4 Q&A, Help & Troubleshooting] v4vyshakh:
Did you use .pit file? Or, just changed the computer? Thanks!
[Galaxy S 4 Q&A, Help & Troubleshooting] krasCGQ:
A good catch! My mistake...

.pit file contains information about partition sizes of System, Cache, and your Internal storage.

I'm personally using .pit file only if I have found broken partition when I was on custom recovery and custom ROM.

.pit file will be useful when you have broken your partition or soft bricked your phone and you want to recover back manually without go to Samsung Service Center. No need to change your computer, except all of your USB ports are dead.
[Galaxy S 4 Q&A, Help & Troubleshooting] v4vyshakh:
Thankyou for the information. So, shall I proceed to flash the .pit file?
[Galaxy S 4 Q&A, Help & Troubleshooting] Lennyz1988:
- Try another pc first.

- Try JOdin (web odin) https://builds.casual-dev.com/jodin3/

- Try Heimdall.
[Android Q&A, Help & Troubleshooting] manu9847:
i use cyanogenmod11..gt i9070.

but i cant move,modify,rename or delete my stock bootanimation.zip...to make a custom animation.

is there any possible way to access it.
[Wear OS General] insaned:
I was searching a solution for this.. However this is still not a daily solution! However this puts a few steps closer at least. Thanks
[Wear OS General] qingtest:
I have updated. wearshell worth to try.
[Wear OS General] letsgoflyers81:
This project looks great since it would let me automate activating theater mode with Tasker and I haven't found any other ways to do it. If I understand your post correctly, I need to save the code to a file and save on my watch's storage. How do I copy the file there?
[Wear OS General] insaned:
I installed the wearshell , then placed the file with the code named doubletap.bsh in watch sdcard folder and created intent in tasker exactly like in the screenshot and nothing.. The intent goes as it should (green dot on tasker) but the watch still the same..
[Wear OS General] qingtest:
if you have sony smart watch 3 like me, can simply plug in your usb cable, otherwise I think can use Debugging over Bluetooth.

then use "adb push" to transfer the file.
[Wear OS General] qingtest:
In tasker the target is Activity/Service, not BroadcastReceiver.

if this does not solve, can you just paste the codes to web shell page (can also insert 'echo xxx;'), see if there is any output or error?

If error maybe it is the root permission, as you can see my sample code needs su.

well I think the key simulation function may not necessarily need root, but I had my watch rooted (my default). You can either root watch or make a little change to the java codes (so that not requiring root permission).
[Wear OS General] insaned:
I was using target as activity.

The watch wakes up the screen like if o touched it in normal mode, but nothing else.

My watch it is supposed to be rooted.. I get the # when using shell, but when I saw on code that had SU it was my first though that it might not be rooted.

What changes you suggest for the code? I'm a bit dumb on code since I'm a basic self learner...
[Wear OS General] qingtest:
It should work. For problem shooting purpose I guest you check shell and beanshell separately.

1. Make sure adb works in the command window.

The first command "input" is to simulate power press, it should 100% work.

The second command "cat" is to simulate double press, if not working you need to redo the recording.

2. Run beanshell with any command like "echo aaa" in the webpage it should 100% work

[edit: print("aaa");]

3. Run my code in webpage, should work

4. Put in tasker

Let me know which step you cannot go through.
[Wear OS General] insaned:
I'm having problem right on the second command... using "adb shell cat /sdcard/doubletap>/dev/input/event2" returns in command prompt "The system cannot find the path specified"... however I have triple checked and I have the file doubletap.bsh in the SDCARD folder....
[Wear OS General] letsgoflyers81:
I pushed the doubletap.bsh file to /sdcard and it's not working for me. Running a task with the intent doesn't do anything despite showing the green dot. My watch isn't rooted so I'm sure that's a factor. When I run the code on the web interface this is the error I get

I tried removing what I thought was calling on su permissions but couldn't get it to work, but it may just be poor syntax. Do you know what the code would be if it's not using su?

Edit:

I can't even get the echo beanshell command to run. When I enter 'echo aaa' in the webpage I get the following:
[Wear OS General] qingtest:
there are two files 1. doubletap 2. doubletap.bsh.

The first one includes is generated following my step A, did you check it?
[Wear OS General] qingtest:
sorry "echo" is only for bash.. if you are running beanshell it should be print("aaa"); which work 100%
[Wear OS General] letsgoflyers81:
Thanks but I'm still overlooking something.

I need to do the above first even if I'm not using the run shell command, correct? I have my watch set to ADB debugging on, but where am I entering the commands? I'm sure I'm just not understanding what to do.
[Wear OS General] insaned:
I assumed we could do B without A, so I guess this was the mistake.

Still I'm lacking some knowleage to where we do this and how..

Where we go for one time record and where we run all this steps? ADB to use the "getevent" and the command?

If you could ptovide some more baby steps would be helpfull! thanks

EDIT:eek:k, I guess I figured it out partially

WIth command prompt and watch screen ON run "adb shell getevent" and while running double press the button (to induce theater mode).

In my phone it showed up like this in the command prompt when I double pressed the button:

I don't get the "bcmpmu_on" on any event but rater "gpnp_pon"

could not open /dev/input/event0, Out of memory

add device 1: /dev/input/event10

name: "ssp_context"

add device 2: /dev/input/event9

name: "tilt_wake_sensor"

add device 3: /dev/input/event8

name: "hrm_lib_sensor"

add device 4: /dev/input/event7

name: "meta_event"

add device 5: /dev/input/event6

name: "step_cnt_sensor"

add device 6: /dev/input/event5

name: "uncal_gyro_sensor"

add device 7: /dev/input/event4

name: "sig_motion_sensor"

add device 8: /dev/input/event3

name: "uncal_geomagnetic_sensor"

add device 9: /dev/input/event2

name: "geomagnetic_sensor"

add device 10: /dev/input/event1

name: "qpnp_pon"

/dev/input/event1: 0001 0074 00000001

/dev/input/event1: 0000 0000 00000000

/dev/input/event1: 0001 0074 00000000

/dev/input/event1: 0000 0000 00000000

/dev/input/event1: 0001 0074 00000001

/dev/input/event1: 0000 0000 00000000

/dev/input/event1: 0001 0074 00000000

/dev/input/event1: 0000 0000 00000000

NOw it's here I'm kind of stuck.. now Im trying to use in the command prompt :

adb shell sendevent cat /dev/input/event1 > /sdcard/doubletap

I event tried

adb shell su sendevent cat /dev/input/event1 > /sdcard/doubletap

and it's returning

"The system cannot find the specified path"

what I'm I missing?