|
Volguus posted:Well, i don't know. The users would use our app to create a thing that then it would be saved into their account online (our web application). That thing needs a name before it can be saved, so the save button pops up a dialog asking for the name and off it goes. Now, one could say that this operation can be called Upload and they'd be kinda right, but to be fair I'm not so sure that Upload is better than Save. At the end of the day is about semantics. The app (the entire solution in general) is targeted at developers not average joe six-pack, so they should most likely know what is going on. If its any help, a common paradigm is that its just automatically saved with some sort of name like "Untitled". Google Docs for example.
|
# ? Dec 23, 2017 00:05 |
|
|
# ? May 28, 2024 15:38 |
|
Volguus posted:Right, so an icon for the Save (and not text) is what should be done then when it is on a main menu. Though I agree with the theory that full screen dialogs should get dialog buttons (with text), in practice, even in their page, it simply looks out of place to have one thing in one place (icons, sure main menu but the user doesn't know or care what's main menu or secondary one) and text in another. I know I saw it used in google android apps and it always looked out of place and inconsistent with the rest of the app. But i guess once people get used to it it'll become normal just like the floppy icon did even though it was obsolete when hard-drives appeared and one no longer saved to the floppy. Well the point is that a full-screen dialog represents an action you're taking - you can select some options or enter some data, but in the end you're going to be making a choice - CONFIRMing or CANCELing that action. The full-screen version moves those buttons up into the title bar, instead of below the dialog contents on the floaty ones, and the CONFIRM button stays as the usual text that states what action you're taking So if your full-screen dialog is about saving (with various options to set before kicking it off) it would make sense to have that confirm button say SAVE, because that's explicitly what the user is choosing to do. The cancel button cancels the action, backs out of the process. The user has to choose one of those two options But icons just represent possible, optional actions the user can take in the current context. You don't have to press any of them, and if you do, they might silently perform some action (like saving to a standard location) or they might pop up a dialog with options, where the user is required to decide whether to go ahead or not. The icon is just a thing on the side that you can press, if you like, there could be lots of them and they don't necessarily end what you're doing So really they do two different things - the full screen dialog really is meant to act like an alert dialog, with its text buttons with explicit actions you have to choose between. It's just laid out like an activity with an action bar because it's full-screen. You might not agree with it or follow it (hell I'm noticing how the Awful post editor should probably follow that pattern...) but there is a logic and consistency to it baka kaba fucked around with this message at 02:46 on Dec 23, 2017 |
# ? Dec 23, 2017 02:44 |
|
I'm building a new version of an Android app I originally wrote back in 2012 and just wanted to check if things have changed a lot since then. (I've been mostly in iOS land lately.) In particular, has anything changed with how modern Android apps load data from a local database, display it on screen, and keep it synced if further changes are made to the database? My original implementation used a ContentProvider as the wrapper around a SQLite database and then used a CursorLoader/CursorAdapter to fetch the data and populate a ListView. All inserts/updates/deletes went through the ContentProvider API which would call ContentResolver.notifyChange() to ensure the ListView got updated when something changed. But now I'm reading that you shouldn't really bother using ContentProviders if you're not trying to expose data to other apps, just use SQLite directly instead. Okay, so if you fetch a bunch of data from SQLite and shove it in a list view. Lots of tutorials and documentation on how to do that. But then you have a background service running that syncs that data with a server. New rows get added to the database by the background service. How do you (efficiently) tell your ListView to add the corresponding rows?
|
# ? Jan 1, 2018 05:51 |
|
Fundamentally it all works the same, but with more refined tools. If you're using SQL, just go ahead and use Room, the new wrapper library from Google. If you're feeling fancy you can use all the new architecture components, they'll help deal with the awful issues of configuration changes and - relevant to your case - notifying when a data source updates. Use a RecyclerView instead of a ListView (RV is just a way better version of it), create an adapter and tie it in with your Room data and notify it when the data changes. That's vague info but it's hard to be more detailed with such a broad question.
|
# ? Jan 1, 2018 06:19 |
|
I am using OpenCv with Android to process camera frames...code:
code:
|
# ? Jan 4, 2018 22:59 |
|
So we have been building my app to work on the Pixel C and based on my emulators for various sized screens, it looks how I expect it to on vanilla android. Turns out that google has discontinued the Pixel C, so we decided to verify that it works on a Samsung Tab 3, but for some reason everything is too large and takes up more screen than it should. Is there some trick to getting apps to look correct on Samsung? Did I gently caress up by using hardcoded dp and sp? I thought the entire point of using those was to enable the layout to work on all screen sizes?
|
# ? Jan 24, 2018 16:38 |
|
It looks like you hosed up by samsunging yourself These people are talking about an older model but it looks like Samsung was intentionally reporting the wrong density to get bigger icons. Wouldn't be surprised if they're doing it on your model too You've done right using dp and sp - they're not always perfect, devices go into the closest density category so you get some variation, but they should be pretty consistent. Can't help if computers lie though
|
# ? Jan 24, 2018 17:00 |
|
baka kaba posted:It looks like you hosed up by samsunging yourself god drat that sucks what's a non-lovely tablet that doesnt cost mongobucks? im beginning to think that if we had just done what I wanted to do and did this app for iOS we would have finished this a long time ago lol
|
# ? Jan 24, 2018 17:06 |
|
FAT32 SHAMER posted:god drat that sucks Google doesn't care about Android tablets, so there's not exactly a definitive non-lovely tablet...and what you want is less likely to be a definitive non-lovely tablet and more like a tablet that best represents what your potential users will have. Do you have any idea what your target market is using? And yes, you probably would've finished an ios version a long time ago!
|
# ? Jan 24, 2018 17:13 |
|
Thermopyle posted:Google doesn't care about Android tablets, so there's not exactly a definitive non-lovely tablet...and what you want is less likely to be a definitive non-lovely tablet and more like a tablet that best represents what your potential users will have. Do you have any idea what your target market is using? It's an internal app so we get to select what tablet to give the consultants that will be using it, so anything goes really
|
# ? Jan 24, 2018 17:17 |
|
Chromebooks? I know it's not strictly a tablet but it fits into the category you're describing. They're cheap too.
|
# ? Jan 24, 2018 19:03 |
|
Taffer posted:Chromebooks? I know it's not strictly a tablet but it fits into the category you're describing. They're cheap too. I'm currently working on convincing my boss that the Pixelbook would be the best option since a lot of the consultants are guaranteed going to whine about not having a keyboard, but the bossman feels they dont meet the usecase and also doesnt want to spend $999/consultant just in case, does anyone have any Pro Tips for fragmenting your app specifically to work around TouchWiz?
|
# ? Jan 24, 2018 19:50 |
|
You can always use the Build class to check if it's Samsung or a very specific Samsung model, if you hate your life.
|
# ? Jan 24, 2018 20:36 |
|
FAT32 SHAMER posted:I'm currently working on convincing my boss that the Pixelbook would be the best option since a lot of the consultants are guaranteed going to whine about not having a keyboard, but the bossman feels they dont meet the usecase and also doesnt want to spend $999/consultant Jailbroken Kindle/KindleFires are <$100 each.
|
# ? Jan 24, 2018 21:50 |
|
Is there a way to fix this annoying Intent behaviour?
I basically want to consume that initial intent, so I don't handle it again. I also want to be able to handle new intents that look like the old ones (e.g. if the backgrounded app is opened from an external URL intent again) I can't work out anything that works. If you call setIntent that only sticks around until the activity is destroyed - it still gets recreated with the original intent. You can't do getIntent and add anything like a flag that says "handled this" as an Extra, it doesn't show up in the recreated activity. Can't even relaunch the current activity with startActivity and a 'neutral' intent, because it's not actually creating a new activity so it doesn't stick as the 'original' intent when the activity's recreated Is there a way round it? It's a huge pain so there must be some technique... right?
|
# ? Jan 26, 2018 23:11 |
|
Have you tried messing with the intent flags to get it to reuse the same instance of the Activity? I'm not sure if that will help with this or not but it's worth a go. Otherwise I think you'd have to persist the screen state to local storage (with Room or whatever you want).
|
# ? Jan 27, 2018 01:31 |
|
Why exactly does your activity launching need to be stateful? Could you note that you Did The Thing in onSaveInstanceState?
|
# ? Jan 27, 2018 01:43 |
|
I had thought of the savedState thing, my problem was if the 'sticky' intent that's handled and marked as ignored was replaced with a new identical one, a fresh event that would get ignored But that got me thinking, I experimented a bit and worked out that the intent 1 that first creates the activity (using FLAG_ACTIVITY_CLEAR_TOP here) sticks with it, forever, even when it gets restored. If it's backgrounded and destroyed, and you send another intent 2 (say from a share handler) that brings up the activity again, it gets recreated with Intent 1 again, back to that original state, and then Intent 2 comes in through onNewIntent So it looks like I fixed it by only handling that baked-in intent in onCreate if there's no saved state, meaning it's a fresh start and that intent hasn't been handled. Otherwise you can just ignore it, and any new intent that restored the activity will just come in through onNewIntent as usual Sorry if I've just worked out some obvious stuff here, I haven't run into this kind of thing before. I guess I understand the beautiful activity lifecycle a little more now
|
# ? Jan 27, 2018 03:35 |
|
I have an app built on iOS using Scenekit which uses inverse kinematics. I'm thinking about porting it to Android, but I'd like to avoid using Unity if possible. Does Android have an IK library outside of Unity?
|
# ? Feb 4, 2018 03:41 |
|
That's a really vague question. Do you need a 3d engine? 2d? What kind of rendering capabilities do you need to go with it? Short answer, you'll probably have to use unity. You can try to find a small lightweight engine but those tend to be painful.
|
# ? Feb 4, 2018 04:02 |
|
Taffer posted:That's a really vague question. Do you need a 3d engine? 2d? What kind of rendering capabilities do you need to go with it? It's in 3D. I'm using OpenGL, and the capabilities are pretty basic
|
# ? Feb 4, 2018 04:26 |
|
Are there any good Android tutorials that aren't video-based? Seems like Google's Udacity course is the most highly recommended source out there, but it's mainly videos which is a little frustrating to get through and limits the times I'm able to pick up the tutorial. Some sort of free resource would be most kick-rear end, but book recommendations are good too.
|
# ? Feb 6, 2018 05:46 |
|
The Dark Wind posted:Are there any good Android tutorials that aren't video-based? Seems like Google's Udacity course is the most highly recommended source out there, but it's mainly videos which is a little frustrating to get through and limits the times I'm able to pick up the tutorial. Some sort of free resource would be most kick-rear end, but book recommendations are good too. I found Big Nerd Ranch's Android book to be very good and using it I was able to build a great final project in my senior year
|
# ? Feb 6, 2018 08:31 |
|
I dunno about the best, but
I'm guessing you already know Java? If not the official tutorials are good. If you want to learn Kotlin (recently added as a supported language and getting pushed heavily) then they have a nice set of exercises you can code and test in the browser
|
# ? Feb 6, 2018 09:47 |
|
Be careful with Vogella, I found some blatantly false info on there a couple times.
|
# ? Feb 6, 2018 15:28 |
|
Can you remember what it was? I used it years ago and they seemed pretty good, but now it has... I don't know, a vibe like they're churning out articles. Doesn't feel so much like the one guy running his tutorial website anyway
|
# ? Feb 6, 2018 16:04 |
|
Lars Vogel is obsessed with Eclipse for some reason so I generally avoid his articles these days. Anyone who thinks Eclipse is a good thing to use to develop Android apps in 2018 is not really someone I'm willing to pay any attention to.
|
# ? Feb 6, 2018 17:24 |
|
Thanks guys, I'll check out those resources! Codepath and the codelabs seem super handy. Regarding Java, I remember going through some of University of Helsinki's Java course but didn't find it too helpful. I work professionally in C#, so I figure that since the languages are close enough I could just jump into Android and pick up the relevant additional Java knowledge as I go along. If this is a terrible idea feel free to yell at me.
|
# ? Feb 6, 2018 18:25 |
|
The Dark Wind posted:Thanks guys, I'll check out those resources! Codepath and the codelabs seem super handy. I did the opposite and they’re close enough that you’re going to keep your head above water and possibly even do a bunch of laps, worked well enough for me
|
# ? Feb 6, 2018 18:27 |
|
baka kaba posted:Can you remember what it was? I used it years ago and they seemed pretty good, but now it has... I don't know, a vibe like they're churning out articles. Doesn't feel so much like the one guy running his tutorial website anyway No, sorry, it was years ago.
|
# ? Feb 6, 2018 21:04 |
|
The Dark Wind posted:Regarding Java, I remember going through some of University of Helsinki's Java course but didn't find it too helpful. I work professionally in C#, so I figure that since the languages are close enough I could just jump into Android and pick up the relevant additional Java knowledge as I go along. If this is a terrible idea feel free to yell at me.
|
# ? Feb 7, 2018 09:28 |
|
anyone have any experience trying to expose Rx-based architecture to a larger group in an org or being the other end of it and being forced to learn? We've set up our stuff with RxSwift/RxJava+Kotlin and it's been really great for building consistent apps quickly across platforms and cutting down on dumb side effects / mutable state issues. We're in a position where we can make what we've been doing the standard for a larger group within the org and enforce it, but I've been doing Rx-heavy apps for awhile now and the concern is that I might have lost perspective / it might not be practical for a larger group, and we need something more "watered down."
|
# ? Feb 10, 2018 18:38 |
|
Any recommendations for the best way to learn OpenGL ES for someone who has little to no experience with graphics programming? I've been working on an app that applies glitch effects to images and some of the effects take upwards of 15 seconds to process, long enough for me to think my app had crashed before I realized it just was taking a while (especially bad since some of the effects are meant to be interactive by moving your finger across the screen). Right now everything works by getting a bitmap of an image, then turning said bitmap into an array of pixels that are acted upon one by one. I've done some reading on other image editing apps where developers have said they've gone from one filter update every 4 seconds to >30 per second by switching to OpenGL from pixel-by-pixel processing, but the more I read about shaders and textures the more confused I get. I've tried searching for resources but almost everything I've found is for game programming which I'm not sure will be helpful for what I'm trying to do.
|
# ? Feb 21, 2018 08:23 |
|
I found these helpful when I had to learn it to get around the slowness of Canvas drawing http://www.learnopengles.com/android-lesson-one-getting-started/ Tutorial for Android covering all the main stuff - old, but still relevant (OpenGL ES 3 works the same, just has more helpful features) http://blog.db-in.com/all-about-opengl-es-2-x-part-1/ More of a broad overview of how OpenGL ES actually works as a state machine, why you're calling these weird functions and the reason it's organised the way it is. There's some code in this one but it's aimed at iPhone developers, I just found the explanation of the model really helpful This is fairly basic so it'll get you drawing shapes on a Surface, which is really all I needed to do, but it sounds like you want to get a bit more involved with shaders and the like to make the glitching. I don't really have any resources for that (the game dev thread might), but you can probably experiment with stuff you find online. You'll be writing that in the shader language (GLSL) though Also a big tip - you need to be able to spot errors in your code, which generally means calling a "was there an error" function, like the one here Java code:
One other option you can look into (which I don't know anything much about) is Renderscript, which is meant for fast computation, including image stuff: quote:Filterscript defines a subset of Renderscript that focuses on image processing operations, such as those that you would typically write with an OpenGL ES fragment shader.
|
# ? Feb 21, 2018 18:46 |
|
Hey how do I check what the android emulator is getting stuck on through the command line? I've got a jenkins server that is supposed to run one on builds, but it doesn't seem to be booting.quote:12:28:03 $ /var/lib/jenkins//platform-tools/adb start-server quote:12:42:49 $ /var/lib/jenkins//platform-tools/adb -s emulator-5736 wait-for-device shell getprop init.svc.bootanim
|
# ? Mar 3, 2018 20:48 |
|
While Jenkins awaits, what happens if you run ADB devices on the server yourself as the Jenkins user? My suspicion is that your not standard port is the cause of the problem but I don't do Build Janitoring myself. I also don't know how you get adb to look on a specific port if it's not there. You've seen https://developer.android.com/studio/run/emulator-commandline.html#startup-options I'm sure?
|
# ? Mar 5, 2018 06:19 |
|
The plugin that does that randomly generates the ports on each job, and does not give an option to set them manually. Edit: this plugin https://wiki.jenkins.io/display/JENKINS/Android+Emulator+Plugin brand engager fucked around with this message at 08:01 on Mar 5, 2018 |
# ? Mar 5, 2018 07:53 |
|
I'm running a copy of it manually to see how long it takes to boot. Been 30 minutes so far and it hasn't finished. This instance doesn't have virtualization features so no hardware acceleration. Edit: Still wasn't done booting after an hour and a half. brand engager fucked around with this message at 18:04 on Mar 5, 2018 |
# ? Mar 5, 2018 16:36 |
|
It should take no longer than 5 minutes at the worst, sanity check that you can start ANY emulator on the build system first. Remove all the arguments and make a standard API 26 target or something.
|
# ? Mar 5, 2018 19:10 |
|
|
# ? May 28, 2024 15:38 |
|
Volmarias posted:It should take no longer than 5 minutes at the worst, sanity check that you can start ANY emulator on the build system first. Remove all the arguments and make a standard API 26 target or something. I was running this avd quote:Name: hudson_en-US_120_QVGA_android-25_google_apis-armeabi-v7a_10 code:
|
# ? Mar 5, 2018 19:26 |