|
e
speng31b fucked around with this message at 18:11 on Nov 1, 2022 |
# ? Jul 1, 2015 00:12 |
|
|
# ? May 29, 2024 19:24 |
|
That does look rad as hell. I don't know if they'd consider the wireframes 'Material' enough, but if they do you could end up in one of their keynote videos at this rate
|
# ? Jul 1, 2015 01:25 |
|
speng31b posted:Just released an update to the latest app I've been working on, a prototyping/design tool. Previously we just had simple wireframe support (think super-simple vector art). Now we've added interactive screen links sort of like POP, but without having to take pictures and whatnot. Anyhow I made up a dynamic transition system for the screen links that makes for a pretty neat video: That's... Impressive.
|
# ? Jul 1, 2015 02:14 |
|
speng31b posted:Just released an update to the latest app I've been working on, a prototyping/design tool. Previously we just had simple wireframe support (think super-simple vector art). Now we've added interactive screen links sort of like POP, but without having to take pictures and whatnot. Anyhow I made up a dynamic transition system for the screen links that makes for a pretty neat video:
|
# ? Jul 1, 2015 09:48 |
|
Whoops sorry. It's here And yeah I was kind of hoping it would get some kind of editor's featured thing, but I'm worried it doesn't have enough drop shadows and giant circular buttons. In the next update I'm going to try to add more drop shadows and giant circular buttons that perform mysterious functions indicated by ambiguous iconography to make sure I'm in line with the latest style guidelines. Here you can see I have used my app to create the vision of more giant circular buttons: e: my next idea for an app - generate giant drop-shadowed circular buttons which you can then share with others. These buttons perform unknown actions, some beneficial and some horrible. You get to send someone the button and then get sent back a camera or mic recording of their reaction when they press the giant circular button and are greeted with cheer or disaster. It will get all the good PR because it's so Material. speng31b fucked around with this message at 18:13 on Nov 1, 2022 |
# ? Jul 1, 2015 13:09 |
|
I think the big button should bump the little buttons and send a ripple out when creating new ones, like a Newton's cradle. That way you get a visual sense of the result propagating from the source, which is Material as gently caress. Maybe if they reach the edge of the screen any new ones can be sent to a local Chromecast or a Wear device. Don't steal my ideas Anyone know if there's a way to get Android Studio to reference some other source code when stepping through the debugger? I'm trying to fix some nonsense with a SurfaceView but I can't tell what's going on in there, since the SDK source for the class is just a stub, and referring to a webpage is pretty tedious. Grepcode is pretty neat though
|
# ? Jul 3, 2015 01:35 |
|
As long as the source is nonobfuscated and non-ndk it shouldn't be a stub. If it's either of those you're hosed sorry. The latest version of Android studio will even decompile obfuscated jars and put them back together as best it can on ctrl+click which is pretty cool. And yeah grepcode is cool. If you cant ctrl+click to it and it's not in grepcode then you've probably hit the end of the line!
|
# ? Jul 3, 2015 02:42 |
|
In the SDK controls, you should be able to download the source for your target, as well as the images etc.
|
# ? Jul 3, 2015 04:58 |
|
Nah I mean the source for SurfaceView in the SDK sources is literally thisJava code:
baka kaba fucked around with this message at 16:50 on Jul 3, 2015 |
# ? Jul 3, 2015 16:33 |
|
baka kaba posted:Nah I mean the source for SurfaceView in the SDK sources is literally this It's a little weird. For classes that use android internals they'll provide stubs so they don't have apps built against an SDK that has access to system internal libs. If you look at AOSP you should notice that the actual SurfaceView source imports the following: import com.android.internal.view.BaseIWindow; Anything in AOSP that needs to import from internal will have a similar stub impl in the SDKs your apps build against. That's why I always have grepcode available or AOSP pullable.
|
# ? Jul 3, 2015 16:51 |
|
Oh ok, thanks! That's annoying. So being able to point to an external source file would be even more useful then, if this isn't exactly a one-off situation
|
# ? Jul 3, 2015 18:39 |
|
baka kaba posted:Oh ok, thanks! That's annoying. So being able to point to an external source file would be even more useful then, if this isn't exactly a one-off situation It's pretty uncommon. Most things you'd want to jump to source on have complete source in the app facing SDK.
|
# ? Jul 3, 2015 18:44 |
|
Yeah, you're looking at the decompiled SDK target "source" (i.e. the stubs), when you should be looking at the sources you can download separately with your target. Your IDE should be able to target a different set of source files, but Android Studio should handle doing that already.
Volmarias fucked around with this message at 19:00 on Jul 3, 2015 |
# ? Jul 3, 2015 18:57 |
|
I just released my first Android app, a minesweeper clone called Swine Peeper where you try to find your pigs in a field without waking them up. I made it to teach myself programming and I'm hoping to score a sweet job with it. Here it is on CodePen, please tell me if you see anything especially stupid in my code: http://codepen.io/tipvfl/pen/WvMjdb?editors=001 Here is the trial Android version: https://play.google.com/store/apps/details?id=com.ionicframework.swinepeeperfree751101 And the full Android version: https://play.google.com/store/apps/details?id=com.ionicframework.myapp630896 This was a ridiculous amount of work and despite it being just a clone of a game I'm pretty proud of it for being my first real project.
|
# ? Jul 3, 2015 21:24 |
|
So my three person group is putting together a basic Android app for a school project, and I have a layout question. My layout basically has a number of EditTexts for users to input text. Then underneath, there is room for a list of spinners. They user can click a button and add another spinner (they can choose a custom list of exercises, one from each spinner). Underneath that, there are a few buttons. So I made the spinner a LinearLayout, but you can't scroll through the list if it gets long. So I tried wrapping the LinearLayout with a scroll view, but that doesn't seem to be working right. I guess I want the list to expand and let the user scroll through it and have the buttons be pushed down. How should I be doing that?
|
# ? Jul 7, 2015 00:53 |
|
Volmarias posted:Yeah, you're looking at the decompiled SDK target "source" (i.e. the stubs), when you should be looking at the sources you can download separately with your target. Your IDE should be able to target a different set of source files, but Android Studio should handle doing that already. Just in case I'm missing something, this is what I have Most of the library is the full source code, this is the first class I've run into where it's explicitly a mock class with everything stubbed out (I've had a few that did decompile though). What speng said makes sense, but if there is a way to get the real SurfaceView source displaying in the IDE so the debugger can show where it's up to, that would help a ton Tip posted:I just released my first Android app, a minesweeper clone called Swine Peeper where you try to find your pigs in a field without waking them up. Nice job! It's got a good feel to it, I like how the state saves too. Couple of bugs I noticed:
baka kaba fucked around with this message at 02:52 on Jul 7, 2015 |
# ? Jul 7, 2015 01:52 |
|
I don't think I quite understand how TextViews work. I'm able to read data from the accelerometer and send it to the log, but I can't get it to display. I have an activity that's called when the user presses the "start" button on the main activity; here's its layout:XML code:
Java code:
|
# ? Jul 7, 2015 20:50 |
|
baka kaba posted:Nice job! It's got a good feel to it, I like how the state saves too. Couple of bugs I noticed: Thanks for trying it out and good spotting on the bugs! I had not noticed the text caret issue, that is a little annoying and I might fix it. It's not much of a priority though as it's mainly meant to be a mobile app. The appearing pigs trick is actually you managing to start the cheat mode. You can, at any point, make them all appear by holding a square down for 5 seconds. The timer is set up to clear on releasing the click or leaving the square, but occasionally with weird mouse movement chrome doesn't properly report those states. I did some work to minimize it, and I haven't seen it in the app version, but it might be worth just ripping out the cheat mode to prevent accidental cheating. As far as the column gapping, every column has the exact same settings and the gapping seems to be a quirk of the css rendering at certain resolutions and grid sizes. I think it would be fixable if I was working with a fixed resolution or I had fixed board sizes but I'm generating the CSS for sizing of game board elements on the fly on a dynamically scaling resolution independent play area.
|
# ? Jul 7, 2015 23:23 |
|
hooah posted:I don't think I quite understand how TextViews work. I'm able to read data from the accelerometer and send it to the log, but I can't get it to display. I have an activity that's called when the user presses the "start" button on the main activity; here's its layout: What's lastUpdate's starting value? Add a log line to the inside of that if block, or better yet a breakpoint. Does it reach there? Are your textviews visible? If you give them starting values, do you see them? Also, does your callback happen on the UI thread? Do you need to call postInvalidate for some reason?
|
# ? Jul 8, 2015 01:59 |
|
Volmarias posted:What's lastUpdate's starting value? Add a log line to the inside of that if block, or better yet a breakpoint. Does it reach there? lastUpdate is initialized to 0. I set a breakpoint to the innermost if's lastUpdate = curTime statement and it got reached. quote:Are your textviews visible? If you give them starting values, do you see them? quote:Also, does your callback happen on the UI thread? Do you need to call postInvalidate for some reason? I don't know about any of this. How would I figure out the answers to these questions?
|
# ? Jul 8, 2015 02:10 |
|
You can give them a text value in the XML, same as you did for the button. That will let you check that they exist and are visible.
|
# ? Jul 8, 2015 08:00 |
|
Oh, of course. I did that, and can see the text. The problem was that I was setting the member variable TextViews to a new TextView, rather than grabbing by id. Duh. However, now I guess I don't quite understand the values coming out of the accelerometer. When the phone's flat on the table, x and y are ~0, and z is ~10. When the phone's vertical and in front of my face (that is, just lifted up from the table, only rotating the screen "forwards"), x is still ~0, but y and z exchange values. I can't seem to move the phone in a way that at least two axes don't add up to 10. That is, I can't make all the outputs the same value. I'll go read up on the various position/motion-related sensors (there's a hell of a lot for some reason). hooah fucked around with this message at 13:11 on Jul 8, 2015 |
# ? Jul 8, 2015 13:04 |
|
hooah posted:When the phone's flat on the table, x and y are ~0, and z is ~10. When the phone's vertical and in front of my face (that is, just lifted up from the table, only rotating the screen "forwards"), x is still ~0, but y and z exchange values. I can't seem to move the phone in a way that at least two axes don't add up to 10. That is, I can't make all the outputs the same value.
|
# ? Jul 8, 2015 15:22 |
|
Tunga posted:Correct, because gravity is ~10m/s^2. Oh. Well of course. After reading the sensors pages some more, the recommendation that linear acceleration and rotation vector are likely to be the most useful, so I've changed my app to display that data. However, it doesn't seem to update both at once. Usually the rotational data updates a lot, but the linear data hardly ever updates. Here's my onSensorChanged method; what am I doing wrong? Java code:
|
# ? Jul 8, 2015 18:02 |
|
hooah posted:Oh. Well of course. After reading the sensors pages some more, the recommendation that linear acceleration and rotation vector are likely to be the most useful, so I've changed my app to display that data. However, it doesn't seem to update both at once. Usually the rotational data updates a lot, but the linear data hardly ever updates. Here's my onSensorChanged method; what am I doing wrong? Just a guess, but the orientation of your phone probably changes a lot more frequently (and to a greater degree) than how hard you're accelerating it. Unless you're shaking your phone around like a spaz, you're not going to have frequent acceleration events because the system is not going to report really tiny accelerations or you'd get lots of noise from things like "I'm walking while on the phone."
|
# ? Jul 8, 2015 18:13 |
|
LeftistMuslimObama posted:Just a guess, but the orientation of your phone probably changes a lot more frequently (and to a greater degree) than how hard you're accelerating it. Unless you're shaking your phone around like a spaz, you're not going to have frequent acceleration events because the system is not going to report really tiny accelerations or you'd get lots of noise from things like "I'm walking while on the phone." That seems reasonable, but if I comment out the rotation vector block, the linear data updates more frequently.
|
# ? Jul 8, 2015 18:26 |
|
Well they're both hitting the same last update timestamp, right? Also you can set different update speeds when you register the sensor, remember What's your end goal here? If you're trying to do something like display the device orientation, you might be better using something like the orientation sensor or whatever, than trying to wrangle the individual sensors it uses yourself e- orientation not rotation. I love how the android dev site is completely unreadable on mobile devices baka kaba fucked around with this message at 18:42 on Jul 8, 2015 |
# ? Jul 8, 2015 18:39 |
|
The end goal is going to be something like "detect a certain gesture, compare it to that gesture's 'standard'". Right now, I'm just trying to get a proof-of-concept done that can just record data (to a file, but that should be fairly straightforward - right?). The last update and update speeds I got from this tutorial over here. Removing the check on "recentness" seems to make the display behave a little better: now the linear data updates a handful of times per second, but the rotation data absolutely flies. Ideally I'd like to sample both sensors at the same time. I think.
|
# ? Jul 8, 2015 18:53 |
|
baka kaba posted:Well they're both hitting the same last update timestamp, right? Also you can set different update speeds when you register the sensor, remember Well you're not coding via the mobile device sooo...
|
# ? Jul 8, 2015 19:12 |
|
hooah posted:The end goal is going to be something like "detect a certain gesture, compare it to that gesture's 'standard'". Right now, I'm just trying to get a proof-of-concept done that can just record data (to a file, but that should be fairly straightforward - right?). The last update and update speeds I got from this tutorial over here. Removing the check on "recentness" seems to make the display behave a little better: now the linear data updates a handful of times per second, but the rotation data absolutely flies. Ideally I'd like to sample both sensors at the same time. I think. Yeah some of them are jumpy as hell. You can slow it down with a different update speed for that sensor, but either way you'll probably want to handle your 'recentness' separately for each sensor with their own timestamps and such, or possibly keep a running average and check that every so often (which will filter the readings and make sure the one you do record isn't a twitchy outlier) Volmarias posted:Well you're not coding via the mobile device sooo... It would be nice to see more than the first column of a table though! At least let me scroll the thing over or switch to the desktop site (thanks Chrome). This ain't the Material experience I signed up for
|
# ? Jul 8, 2015 20:00 |
|
Doghouse posted:So my three person group is putting together a basic Android app for a school project, and I have a layout question. I waited in case someone who knows what they're talking about chipped in, but why didn't the ScrollView work? I just tried it and my problem is the scrollview eventually fills the screen and pushes the buttons off the bottom. I ended up basically doing this: http://www.curious-creature.com/2010/08/15/scrollviews-handy-trick/ Which is basically the buttons acting as a footer, so they're always locked to the bottom of the screen, and the scrollview fills the rest I can't get what I think you want though, which is a scrollview with buttons hanging off the bottom, which move down as the scrollview expands, but stop at the bottom (meaning the scrollview hits a maximum size and starts scrolling its content). You can probably do it programmatically if you like a challenge/hate life, but I'm not sure if you can do it in basic XML. Someone else might know, I never got the hang of layouts
|
# ? Jul 9, 2015 02:10 |
|
ScrollViews with content below can be a bit fiddly. Usually you can achieve good results with creative use of fillViewport and/or weight values.baka kaba posted:I can't get what I think you want though, which is a scrollview with buttons hanging off the bottom, which move down as the scrollview expands, but stop at the bottom (meaning the scrollview hits a maximum size and starts scrolling its content). Edit: VVVV Yeah, I mean a LinearLayout. It has been a long week! Tunga fucked around with this message at 15:38 on Jul 9, 2015 |
# ? Jul 9, 2015 11:44 |
|
You mean a LinearLayout? It actually works as expected until the ScrollView content gets long - the ScrollView locks to the bottom of the screen and shoves the buttons off the screen entirely (you can't see them, anyway). It's weird behaviour You can do it with a relative layout too, and maybe if you mess around with padding and offsets you can make it happen, but it feels like trying to work around something broken to me vv
|
# ? Jul 9, 2015 15:09 |
|
Use layout weights. Your bottom layout with buttons has height wrap_content and weight 0, your scroll view has height 0 and weight 1.
|
# ? Jul 9, 2015 16:26 |
|
Volmarias posted:Use layout weights. Your bottom layout with buttons has height wrap_content and weight 0, your scroll view has height 0 and weight 1. I'm pretty sure it's possible in XML but I'd have to play with some layouts to say for sure how to do it.
|
# ? Jul 9, 2015 17:00 |
|
Edit: never mind
|
# ? Jul 9, 2015 17:09 |
|
Yeah there's a million ways to get the buttons stuck to the bottom as a footer, seems like. But having the whole thing only wrap its content, without expanding beyond the screen height... that's a bunch of work for some reason. I still think padding and an offset will work, but it's kludgy. I am probably missing something about the layout system though
|
# ? Jul 9, 2015 17:33 |
|
If someone were to post an mspaint thingy explaining exactly what this Frankenstein's monster of scrollviews and linearlayouts needs to look like I'll post the layout for it. I know every trick with scrollviews and linearlayouts and layoutweights and they are all stupid and should be documented somewhere.
|
# ? Jul 10, 2015 15:31 |
|
I have AS open right now so I could have just used the layout designer but hey, you can't beat the bespoke artisanal touch of an mspaint So basically the button hangs off the bottom of the scrollview, which is only wrapping its content - it's basically 'not there' as far as the user's concerned, until you add too many views to its layout, and then it becomes a scrollable area. So the scrollview is the only element that expands to fill available space, but only as needed, and the other elements always have to be visible - the button should never float lower than the edge of the screen Or the shorter version - EditTexts, some amount of Spinners, Button, all stacked vertically and against the previous element. If it won't all fit on the screen, the Spinners become a scrollable list that fits the available space
|
# ? Jul 10, 2015 17:35 |
|
|
# ? May 29, 2024 19:24 |
|
Sorry, a stupid question maybe but I haven't been able to figure it out from tutorials. What is the general guiding principle behind when you need to split something into a separate Activity, provided you are using Fragments? I seem to be able to construct as complex a UI as I want, with many screens and moving parts, just by shuffling Fragments around.
|
# ? Jul 11, 2015 00:08 |