For @LetMeBeYourLostDisciple 's question? I'm curious about this. In the JavaDoc and reference for onCheckedChanged listener - it says the checkedId parameter is the unique identifier of newly checked Radio Button
but from the linked GitHub code snippet, the author unnecessary IMO finds the view again passing the checkedId to findViewById() and then calling getId on the RadioButton rather than switching on the passed checkedId. Same thing here and here as the checkedId is ignored
Since the id is already passed as a parameter to onCheckedChanged, why go about the stress of RadioGroup.getCheckedRadioButtonId();
I think I'm missing something and Every code snippet is ignoring the int parameter passed to onCheckedChanged
I think I'm missing something and Every code snippet is ignoring the int parameter passed to onCheckedChanged
@Mab: I think passing checkedId to switchi s the efficient way if we only want to know which radio button is switched to checked condition from unchecked. I strongly believe my thought.
Capturing outside objects in an anonymous inner class method while the same objects actually have been passed to it seems to be a bad practice, I think. :-) I am referring to this code.
The method captures the outer object group rather than just use the passed radioGroup.
By the way, the fonts used in this chat room for backtick seem to be hard to distinguish from the surrounding fonts.
Oh yea @LetMeBeYourLostDisciple I understand that, but doesn't answer my Question and even that answer you linked to kinda making me think it's prob something is wrong with Parameters passed to onCheckedChange. In his case he even neglected the passed RadioGroup. But what I'm concerned with is why leave the checkedId parameter only to go call RdioGroup.getCheckedRadioButtonId(); shouldn't they just return same id?
Almost every snippet I've seen so far ignores the checkedId
@Mab Yes. It is mysterious. I will always use checkedId for this case. Or you had better post a new question about it in the main site. I have already made a lot of questions. :-)
@Tim One more thing I just learnt today. Not all events are available as attributes in XML. For example, invoking setOnCheckedChangeListener is only possible from code-behind file (for example MainActivity.java). \0
@LetMeBeYourLostDisciple you should have a reference of the view then do view.setx.. also try changing bg color of the container like a liner or constraint layout instead
If that is the case you will make more money making websites, they are easier are way faster to learn, Idk if rest of the people will agree with me but thats what i think is better for you
@RaghavSood example of such a different field? I need money!! Website are built by CMS these days, the web is scattered, and now the Android I wanna fall back on y'all taking it away from me
Explanation will follow in chat but that is not how it is supposed to be done, For views to change, You have other options like using Fragments or using new activity entirely, I would also like to suggest moving to kotlin.
public class MainActivity extends AppCompatActivity {
View mainView;
...
@LetMeBeYourLostDisciple you should have a reference of the view then do view.setx.. also try changing bg color of the container like a liner or constraint layout instead
Mab 17:51 @RaghavSood example of such a different field? I need money!! Website are built by CMS these days, the web is scattered, and now the Android I wanna fall back on y'all taking it away from me
Yea @asim I respect the opinions . i wanna know Anything really bad about the Framework? I have seen a lot of critic about Android framework.... And what's ur opinion about CMS which gives even non technical people ability to make websites, and about the web being so scattered
People like to criticize everything but that does not mean that you should stop at the very outcry of someone. Sometimes, people here jokingly bad mouth a certain language or a framework but that does not mean that it's awful to work with
Use whatever your idea asks for
Don't be afraid to learn new things
In fact, don't limit yourself to a particular kind of development
Yea, I can't. 2nd year an undergraduate Compt Eng. But that's independent of my development career. AIDE a mobile Android development ide saves my ass .... Pretty bad
@Mab There's a group for teen programmers that offer very high end computers (like macs) for free for those who need. I don't love the group but the program is good.
@JBis, I dunno about that but that sounds cool, I'll love it. But if it's in form of a loan, I don't see myself making that much to pay back in a short time
@Mab No framework bad enough i think, everything have some pros and cons, same for the languages, take for example I don't like flutter but it does not mean flutter is bad, Its more than fine, Regarding the question about website, I do think that ease of making websites made a huge impact on people who spent their lives learning technical details of them
@LetMeBeYourLostDisciple the one that keeps falling off on stage
Understood @asim, for the web part, job requirements are more of Getting verg good at one of those JavaScript frameworks, it (web dev) is where I started from but I just feel Android is more secured in the sense that it's isn't going anywhere soon... I understood anyway thanks