[Q] First App Question - Android Studio

I am definitely new to Java and have been playing around with Android Studio. I want to make a basic app for the learning experience.
What I would like to know how to do is move from one "activity" to the other with the push of a button on the screen. My intent is to have a set of buttons on the screen and when a button is clicked, it goes to another "activity" and displays the content on that page.
Like I said, probably very simple, but I am just starting and need some help in the right direction.
Thanks in Advance..

dmyers1429 said:
I am definitely new to Java and have been playing around with Android Studio. I want to make a basic app for the learning experience.
What I would like to know how to do is move from one "activity" to the other with the push of a button on the screen. My intent is to have a set of buttons on the screen and when a button is clicked, it goes to another "activity" and displays the content on that page.
..
Click to expand...
Click to collapse
It's funny you use the word "intent" because that's what you need. Here's a quick lesson on them from Stackoverflow.com. (I changed http to hxxp since I can't post links yet.)
hxxp://stackoverflow.com/questions/4186021/how-to-start-new-activity-on-button-click

Related

BackLight brightness adjust command line utility for Kaiser aka TYTN II

I dunno if I'm only one who has this problem but when I'm occasionally on sun I can't see nothing on my Kaiser and it's really difficult to setup backlight brightness on touchscreen which u can't see.... So I've been looking alot if there is some utility which I can link with button or gesture and I haven't found anything... So I've wrote my own utility. Feel free to use it as well if u find it useful -> http://lobster.ic.cz/?page=bl
is this useful or is there easier way to do that??
Been searching for an app like this for a week.
Works great!
Thanks.
Here's another program that gives you a today plug in for it:
http://forum.xda-developers.com/showthread.php?t=412896
I'll b trying yours tho as I like the idea of UL with icons for up and down
Cheers,
Matthew
I made a cab with this program mapped to the PTT button. I have a AT&T Tilt, Im not sure if your phone has a PTT button or if its called something else or whatever.
With this, just run the cab then I tap the button and it changed the brightness really quickly, no menu or anything, I love it! If I walk out into the sun I just tap the button 3 times and my screen is bright.
Lobsterii, I love this program thanks a ton!
I'm glad that I could helped u out guys... actually there might be more funny stuff possible only if HTC release some documentation on theirs DLL files cos it's pain to guess arguments...
you did it all by guessing? I figured you would have decompiled the dll.
Truly excellent! I have also been looking for something like this for a long time.
I figured I might as well kick off the feature requests that always follow a new release: How about the option set both battery and power brightness with one command? Perhaps by a special switch, or by only specifying the brightness level (i.e. no 'b' or 'p' switch)? Or is there a way to do it already?
Thanks again for a useful app!
you did it all by guessing? I figured you would have decompiled the dll.
Click to expand...
Click to collapse
I've read some forum where someone pointed out that backlight function should be in some dll by HTC dunno where it was... Then I was googling "dll find export function" and I've found prog "DLL Export Viewer" which can show function names in dll. Unfortunatelly there is generally impossible to find out how many/what arguments the function has. So I've found function name like HTCUtilSetOnBatteryBrightnessLevel and I've simply try prototype int HTCUtilSetOnBatteryBrightnessLevel(int); but it crashed... so I keep going like int HTCUtilSetOnBatteryBrightnessLevel(int*); and it worked... voila...
pudifoot said:
Truly excellent! I have also been looking for something like this for a long time.
Click to expand...
Click to collapse
thx alot...
I figured I might as well kick off the feature requests that always follow a new release: How about the option set both battery and power brightness with one command? Perhaps by a special switch, or by only specifying the brightness level (i.e. no 'b' or 'p' switch)? Or is there a way to do it already?
Click to expand...
Click to collapse
done. + it's now compiled as an release version so it actually has 50KB less than old version... enjoy it's at the same place instead original files http://www.lobster.3web.cz/bordel/bl/index.htm...
Nice improvements! how about another a switch so that it will toggle between brightest to dimmest? So if this was used it would just go between 1 or 10 and none in between.
Thanks for implementing the feature I was looking for. A perfect application - it's small and fast, and it gets the job done with excellence.
Thank you. Works perfectly.
silentanvil said:
Nice improvements! how about another a switch so that it will toggle between brightest to dimmest? So if this was used it would just go between 1 or 10 and none in between.
Click to expand...
Click to collapse
hmhm... what I wouldn't do for y... There is new version 02 (on my web at the same place) where u can setup your own sequence. Length of sequence might be from 1 to 10... values are as usual from 0 to 9... But numbers must not repeat (known feature I don't see point to solve it) so u can set something like "bl02.exe 0 5 1 9 3" or whatever else... enjoy
Report any found bugs... I mean it's super simple but it's 4 am so I'm half sleeping...
lobsterii said:
hmhm... what I wouldn't do for y... There is new version 02 (on my web at the same place) where u can setup your own sequence. Length of sequence might be from 1 to 10... values are as usual from 0 to 9... But numbers must not repeat (known feature I don't see point to solve it) so u can set something like "bl02.exe 0 5 1 9 3" or whatever else... enjoy
Report any found bugs... I mean it's super simple but it's 4 am so I'm half sleeping...
Click to expand...
Click to collapse
Awesome! Thanks so much! I've also been looking everywhere for something like this!
Awesome!
Well done! I've been looking for ages for something to do this.
How to use bl02...
Something from lobsterii that helped me:
create link in Total commander (file manager) I think its in options "File -> >>>>> -> Create shortcut" then I have another file bl02.lnk then I open properties of the lnk file, I click tab shortcut and put the text of path into "" and after it I wrote parameters so it looks like
"\Program files\bl\bl02.exe" 1 3 9
OK dumb question and first time posting so don't slaughter me. If I understand the thread correctly this will put large buttons to adjust from the Backlight screen....correct? Is there a program (other than the PTT button which I'm using) that will allow a button or swipe to adjust the brightness without having to open the brightness display? If you get far enough to open the utility then its not that hard to move the brightness up. Sorry for the dumbness of the question.
volleykinginnc said:
If I understand the thread correctly this will put large buttons to adjust from the Backlight screen....correct?
Click to expand...
Click to collapse
my bl02.exe doesn't put any button anywhere... it's just app which actually toggle brightness. U can try to run it via file explorer it should change brightness...
volleykinginnc said:
Is there a program (other than the PTT button which I'm using) that will allow a button or swipe to adjust the brightness without having to open the brightness display?
Click to expand...
Click to collapse
There is plenty of programs to map this app to buttons, finger swipes and some other crazy stuff like voice commands etc.. For example I'm using FTouchFlo (u can use FTouchSl which is easier to configure) and map backlight change for finger swipes... Most easy way is just copy blXX.exe to /Windows/Start Menu/Programs/blxx.exe and then go to Start->Settings->(tab)Personal->Buttons and link it with some buton...
I'm just now at work so have no time for more explanation... but Once I get home I'll create some FAQ at download page cos... cos it'll be easier for all of us
dont sweat it that was a perfect explanation and I now have it helped me to get it running to a button.
One other quick question though....I have S2U2. So the button doesn't work until I have unlocked it (which sometimes is hard to see going out to daylight) is there any way (easy way, Im no programmer)to allow the button to work (that is brighten the display via the button I have it mapped to) while it is still locked?
volleykinginnc said:
dont sweat it that was a perfect explanation and I now have it helped me to get it running to a button.
One other quick question though....I have S2U2. So the button doesn't work until I have unlocked it (which sometimes is hard to see going out to daylight) is there any way (easy way, Im no programmer)to allow the button to work (that is brighten the display via the button I have it mapped to) while it is still locked?
Click to expand...
Click to collapse
I'm sure he won't be able to bypass A_C's S2U2, but (assuming you have a Kaiser, you didn't say) if you enable dpad in S2U2 you can always hold your right dpad button to make sure S2U2 is unlocked, even if you can't see the screen, and then hit the button for the "bl02.exe 9" link.
Ha ha...you guys are awesome! Right Dpad enabled and now it works like a charm even in the brightest sun!! Thanks for the great application...makes a big difference in usability.
Some of you experts ought to make a list of these application gems (this program/kaeser tweaks etc) to make it easy for the noobs like me. This is good stuff!!

Configure hardware buttons for gfDoom

Hey guys, i just spent like an hour trying to figure this damn thing out but i cant seem to do it!
here's the game, gfDoom,
http://home.freeuk.com/gamefreaks/pql/gfDoom.htm
just FYI.
I'm attaching the "keyboard" skin for the game, which allows landscape and i'm quite happy with it. The only problem is in landscape i cant see a way to save the game, or exit the game.
By default for Touch Pro, landscape
VOLUME DOWN = OPEN DOOR (which is fine)
BACK BUTTON/OK BUTTON = SHOOT (also fine)
Other hardkey buttons unmapped.
doesnt need a map button since on screen, bottom left corner activates the map
now i'm trying to map the pause/menu button to one of the hardkeys. Make full use of em. Like the enter key and the volume up key. Can someone help me out here? I think one key shud be a letter or something so that can save the game. Like when i wanna save the game i have to type a name.
I have found this link "Keys and Key Codes for Windows Mobile" but am unable to get it to work after several attempts.
http://msdn.microsoft.com/en-us/library/bb431750.aspx
see attachment for the instructions and the folder containing the skin "Keyboard"
Hopefully someone can help me out by helping me map it out.
Please post results here
bump for attention. i'm sure someone knows these stuff and i'm hoping to learn T.T
bump one more time. maybe i shud ask in raphael main forum section?
Change the title of your thread. It sounds like you're trying to get someone to give you registration keys for software, or something equally illegal. I realize you're not, but I may simply be more curious than the average reader.
Look for a program called HButton. It might do what you're looking for.
Also, it's considered bad form to bump your own threads, unless they fall off the first page without getting responses.
Myrddin Wyllt said:
Change the title of your thread. It sounds like you're trying to get someone to give you registration keys for software, or something equally illegal. I realize you're not, but I may simply be more curious than the average reader.
Look for a program called HButton. It might do what you're looking for.
Also, it's considered bad form to bump your own threads, unless they fall off the first page without getting responses.
Click to expand...
Click to collapse
yea it fell off the first page which is why i bumped it.
oh okay will edit thread title.
and btw HButton is to assign apps to hardware buttons. what i need is some help regarding configuring the .txt file for gfDoom to configure Doom controls. what i need is a hardware button for the menu key
Managed to get it working reasonably.
Volume down = FIRE
Volume up = STRAFE (hold down whilst pressing left or right)
OK/Select = OPEN
Back = FULLSCREEN (Toggles between portrait and landscape)
Couldn't seem to map the Call and Call-end buttons successfully.
Having the "Back" button as a full screen button seemed more functional than just using it to pause or quit the game, as from the portrait/keyboard mode you can access these facilities and more (e.g. save, load, exit etc).
Just stick the modded text file in your "KEYBOARD" folder. I've renamed my "KEYBOARD" folder "DEFAULT" so I don't have to use the launcher .exe (configuration tool) and can just use the direct .exe to go straight into the game.
P.s. The game seems to run ever so slightly more smoothly if you disable TF3D (Manila) from: Settings/Today
before launching the game. Simply enable again once you're finished.
In case you want to setup you controls differently, here are the mapping codes for the buttons:
Code:
Button Hex Dec
vol+ 0x75 117
vol- 0x76 118
back 0x5c 92
end 0x73 115
call 0x72 114
ok 0x86 134
up 0x26 38
down 0x28 40
left 0x25 37
right 0x27 39
You need to enter the decimal values within the text file.
i'm actually using the up button to pause game to save etc etc. but i'll definitely try to follow your config for the volume up button. cuz i cant get mine to work. i prefer back as shoot. lets me run around with stylus and shoot/strafe.
I've modded the skin a little further, using the default skins layout and the keyboard skins toolbar (with fullscreen and exit etc)
Attached the skin files...
Made two new skins for GFDOOM from scratch with as much functionality for the Raphael as I could map. I'm quite pelased with them.
One is a Doom themed skin, the other one is to match NRG's EnergyROM theme.

[Q] Any way to lose the Nook apps main button?

During two 12 hour days of rooting and customizing two CNooks, I ran across a procedure for removing the stock Nook apps. Now I can't find it. I'm not sure if that included the main soft button, as well, but I'm giving one of these to my 75 year old Mom and I don't want her confused if she hits this button all the time.
Really appreciate any help here!!!
ClarkSt said:
During two 12 hour days of rooting and customizing two CNooks, I ran across a procedure for removing the stock Nook apps. Now I can't find it. I'm not sure if that included the main soft button, as well, but I'm giving one of these to my 75 year old Mom and I don't want her confused if she hits this button all the time.
Really appreciate any help here!!!
Click to expand...
Click to collapse
AFAIK there's no way to remove the nook shortcut menu in the status bar. So what is she using it for, never reading on it? If you removed the apps and she did launch the shortcuts I guess it'd just fail to load the app, as they seem to be static shortcuts to those apps.
I would think when we get a custom ROM the status bar will be at the developers digression, and maybe someone will figure out a way to update the framework jar to remove the shortcut. My wife likes the shortcut, as her NC is 50/50 reader/tablet.
I installed the Kindle app on the Home screen, which I prefer. The Nook eReader is still there in the app tray, but because I changed the screen res, it screws up some of the texts in the Store and what not. The reader is still fine, though. But with the larger icons and text, it is WAY better. I tricked it out with the Aquarium Live Wallpaper and added Dolphin browser, which supports pinch zoom. And an email client; WeatherBug Elite, a Battery widget, a clock widget, and a WiFi toggle widgit went on the Home screen, as well - and I'm using Zeam for a launcher. I removed all the icons except the app drawer - and also changed the Volume Down button to be a Back and the Up to be a Menu. No SoftKeys for me. BTW: I set the lcd res to 220 using LCDDensity - far better than the 250 someone mentioned on the forum. I still see the time and the notification balloon - albeit, a bit truncated, but it works. I run SetCPU, though not really sure I need to.
I use Quick Settings for Volume.
I'm missing a few things:
1) Love to find out how to do a screen capture.
2) Desperately want Flash.
3) Desperately want Bluetooth.
And, really want to noop the nook shortcut launcher soft key - or preferably the whole status bar. I don't need it, with all the widgets, but I'd be happy to have it as long as the shortcut launcher softkey was nullified.
I'm planning to get NC for my parents of the same age like your mom as well.
They would use it for email and web browsing while traveling.
I hope you will succeed and share
Cool - and of course I'll share! Fact is, it's not a deal-breaker by any means. I
'll just tell her to avoid hitting that menu button. And if she does, she just clicks on the screen or clicks the button again to get rid of it. I'm really more interested in Flash - which I'm sure will be in 2.2, whenever they release it for the CN - and BT. Which I really want for the new BT headphones I bought for my lost Archos 70.
post deleted. it repeated my last one.
Screen capture - hold down the large physical "n" button, and then very quickly press the volume down button. It will store the .png screenshot file in a directory called "Screenshots" in the system storage.
Now, if someone knows how to do video capture of the screen, please let us know.
KryptoNyte39 said:
Screen capture - hold down the large physical "n" button, and then very quickly press the volume down button. It will store the .png screenshot file in a directory called "Screenshots" in the system storage.
Now, if someone knows how to do video capture of the screen, please let us know.
Click to expand...
Click to collapse
Awesome... thanks for posting this. I previously download ShootMe unaware of this functionality.
I did it all from my Nookie...

Remap of capacitive buttons

Like the title says,
I'm looking for a way to remap my home button, specifically for use with tasker. I want tasker to map the home button to a certain launcher during specific times, and default launcher while outside of those times.
Any suggestions?
Sent from my XT1254
OR! If there is a way to have tasker change the default launcher during certain times this will automatically deal with the capacitive home button.
Sent from my XT1254
Are you just looking for a Tasker tutorial? What you're describing seems possible but would just require some playing around with Tasker to figure out.
swboland said:
Are you just looking for a Tasker tutorial? What you're describing seems possible but would just require some playing around with Tasker to figure out.
Click to expand...
Click to collapse
Ive got as far as I can in tasker, Ive messed around with it alot but i cant seem to figure out how to get tasker to do one of the following:
remap home key
change default launcher
theres a few simple ways to do it with root, but since the Droid Turbo isnt rooted yet I'm looking for a workaround.
Based on my knowledge so far - it IS possible without root, just not sure how its done.
there's an app called Home2 Shortcut - and its capable of remapping the home key, which leads me to think theres a way to do it manually with some terminal commands or possibly through an option in tasker that could be sitting right in front of my eyes.
Figured the whole thing out, if anyone requests it, I am willing to give some instructions on how to make a contextual home screen - certain home screens based on location, time, yaddiyadda
I did this so that my home button would default to a Launcher that I set up for work during my shift hours,
Outside of shift hours my home button will go to my default home screen with apps I use at home.
My work screen has navigation apps, shift planning apps, and PDA type set-up
My home/on the couch screen has netflix, chromecast, youtube, spotify, that kind of stuff.
It helps me separate my workflow at work from my workflow at home.
I call it Launcher Switcher, and im copywriting that right there.
ccheww said:
Figured the whole thing out, if anyone requests it, I am willing to give some instructions on how to make a contextual home screen - certain home screens based on location, time, yaddiyadda
I did this so that my home button would default to a Launcher that I set up for work during my shift hours,
Outside of shift hours my home button will go to my default home screen with apps I use at home.
My work screen has navigation apps, shift planning apps, and PDA type set-up
My home/on the couch screen has netflix, chromecast, youtube, spotify, that kind of stuff.
It helps me separate my workflow at work from my workflow at home.
I call it Launcher Switcher, and im copywriting that right there.
Click to expand...
Click to collapse
They stole the name already https://play.google.com/store/apps/details?id=kr.mobilefirst.launcherswitcher&hl=en
joshm.1219 said:
They stole the name already https://play.google.com/store/apps/details?id=kr.mobilefirst.launcherswitcher&hl=en
Click to expand...
Click to collapse
Crap! I'll just name it something else because its far more useful than that app
Sent from my XT1254

remap s-pen button

Anyone ever heard of a way to remap the button on the S Pen?
I rarely use the Air menu in fact I actually disabled it in options.
I do however use the pen in my hand probably 95% of the time, I love the precision as well as having the ability to hover over something without clicking it like a mouse can.
My only thought is that it would be amazing to be able to press the button and have it register as a tap at the current location instead of having it pop up in the air menu.
I also would love to be able to modify that SVG Circle that Prince the current pin location on screen to something more visible and possibly add a trail or something. I'm guessing this would require rooting. I am a long time desktop developer but this is my first time really delving into Android and I have noticed so many hidden services and apps that I would love to kill but I can't so it looks like I may have to root anyway.
That prints* sorry I tried to edit the typos but the save wouldn't send. I'm assuming my you block extension here is blocking some script. I've pretty much disabled 90% of the functionality on this phone just to help secure it that's another thing I need to look into browser security.
+1 on remapping the pen button
bober10113 said:
+1 on remapping the pen button
Click to expand...
Click to collapse
Yeah I think there's a lot of potential for some really helpful and amazing functions. First time I used this and noticed it could track on screen without touch I thought that was something very special. And then when I found that it could register a button press while hovering I immediately thought of thousand applications for this.
Just one off the top of my head. Imagine having an actual useful text to clipboard function where you simply hover the cursor over text you wanted and click the button to highlight and let go of button to stop highlighting. It would make copying text on the phone just like using a mouse. I am so sick of having to long press and stay completely still for the damn thing to register. We shouldn't have to do that with this s pen.
I have tried before on rooted note 3 to remap the s pen button but the phone didn't recognize the command... always pop up s pen menu. I think surely you need root before trying or try adb push.
Regards
Conito, I would love to hear more in-depth description of your attempt to remap it.
https://play.google.com/store/apps/details?id=com.gmd.spencontrol
this might be an option if you have rooted your phone.
it doesn't outright remap your button, but does let you execute commands by drawing lines or symbols while holding the button.
I haven't tested it since the note 2 though because I no longer root devices.
I have even wrote to Samsung asking for this. I want to be able to remap it for the eye dropper to when I'm drawing. It's set as the eraser from Samsung so hopefully someone will one day find a way to at least change the default tool (eraser) That might be easier than a whole other app or something.
cricketpaddleinmyhand said:
Conito, I would love to hear more in-depth description of your attempt to remap it.
Click to expand...
Click to collapse
Sorry mate you have to quote, I didn't see your post until now.
I just try to remap with applications like xposed additions and stuff like that. But the app didn't recognize when I pressed the button. So the only thing we can do is get into the app that manage the spen command and edit it with tools or things like that. I remember that some guy in the note 3 forum develop a simple app that can launch that application. So maybe that could be the solution: edit the behavior of the original spencommand app.
My best regards.

Categories

Resources