Posts by Nakamoto • 1,341 points
46 posts
-
10
votes1
answer451
viewsQ: What is Std in C++?
I’m learning C++ and I see std being using everywhere. What is this std? He’s like a library or something different than that?
-
3
votes1
answer873
viewsQ: What is Broken Pipe Error?
What does the Broken Pipe error mean? And also what would be a Pipe in computing? This error has occurred to me several times and in various programming languages even when using some programs like…
-
3
votes2
answers196
viewsQ: Python 3 - Unexpected Flow Control when running IF/IF NOT or IF/ELSE
I’m new to Python, but I already have custom Java software. I would like to better understand why when trying to program a flow control using IF/ELSE or IF/IF NOT the whole block runs. Python code…
-
0
votes1
answer51
viewsA: Asynctask in infinite loop when using Wallpapermananger
I figured out what’s causing this bug, but not the main reason. The android 8.1 has a function to match the colors of the system with the time of day or based on the coloring of the wallpaper. When…
-
0
votes1
answer51
viewsQ: Asynctask in infinite loop when using Wallpapermananger
My app strangely runs around in an infinite loop uncontrollably. It’s a simple code to download an image and apply as wallpaper. But when removing this line of code, the loop goes away, that is to…
-
1
votes1
answer135
viewsQ: How to display Cursor values using Debugger in Android Studio?
I’m very used to just using the Logcat, while debugging an application. But I realize that the Debbuger is a much more powerful tool. I can pause the state of the application and observe its…
-
1
votes0
answers12
viewsQ: Android - How to get Extras in an Innerfragment(Nested Fragment)?
How to get a Extra within Fragment nestled in another Fragment? I have an Activity with the following Layout: Activity (que infla um){ //Aqui a activity infla 3 Fragments para criar um…
-
1
votes1
answer56
viewsQ: Error while instantiating in Java
In my course on Java OO, I have assembled a class to perform certain functions. But always return Nullpointexception. If I do the same thing main, without creating any class, everything works in a…
-
5
votes6
answers12886
viewsQ: Doubt about logical operators && e || in Java
I have the following code in my app: if (aquaName != null && !aquaName.getText().toString().isEmpty()){ values.put(NAME_COLUMN, aquaName.getText().toString().trim()); } else {…
-
0
votes0
answers22
viewsQ: Android - How to notify updates in the UI from a Cursorloader without Contentprovider?
How to notify updates in the UI using a Loader without ContentProvider? I’m wearing a CursorAdapter custom to show a list using RecyclerView through a Loader (Storing data in pure Sqlite, other than…
-
0
votes1
answer596
viewsQ: Android - Recyclerview with white spaces between items
Recyclerview is showing large white spaces in the layout. Note: When you start scrolling down, items appear normally, but when you go back up, you start displaying large white spaces between items.…
-
1
votes1
answer373
viewsQ: Android - How to create and combine two tables within a list of Sqlite tables on Android?
I’m creating an app to monitor aquarium settings using the following schema: The user can monitor as many aquariums as he wants, but every time he adds a new tank, these two tables should be created…
-
8
votes1
answer479
viewsQ: What is the difference between File Uri, Content Uri and Stringpath?
My application deals with writing and reading files, and I’m a little confused about how and when to use each of these types of Uri. I believe it would be best to understand the difference between…
-
1
votes1
answer68
viewsQ: Android - What is the difference between Bitmap and Drawable?
I’m developing an app that makes a CRUD to fill out information on the screen. One of this information is photos. I would like to know better the difference between these two objects to find out…
-
0
votes1
answer307
viewsQ: Android - Logcat without working/blank
My logcat’s not working. When I start the emulator and click on the Logcat tab, no information appears only blank, as if it is not connected to any device. The screen looks like this:…
-
1
votes1
answer307
viewsA: Android - Logcat without working/blank
The problem can be solved simply by restarting the logcat service. I found the solution based on Soen’s reply: https://stackoverflow.com/a/26565593/6736591…
-
2
votes1
answer190
viewsQ: How to check if a Sqlite3 Database is valid?
I was testing and seeing what happens if android create a database with wrong input values. For example, if I unintentionally typed NOOT instead of NOT or INTEGET instead of INTEGER, I expected SQL…
-
0
votes1
answer59
viewsQ: What is the utility of using Basecolumns. _ID to define a contract class in Sqlite?
Why should I wear Basecolumns. _ID instead of simply defining a string as _id ? For example, instead of using: public static final String _ID = BaseColumns._ID; Wouldn’t it be simpler to use this?…
-
3
votes1
answer1007
viewsQ: Android - What is the difference between getReadableDatabase() and getWritableDatabase()?
I was able to enter information in the database using the method getReadableDatabase(). In that case shouldn’t it be wrong? Shouldn’t it be the method getWritableDatabase()? private void savePet() {…
-
1
votes1
answer532
viewsA: Android - How to finish/finish an Activity?
I found the solution in the @valdeir-psr cometarium Simply call the Finish() method in within any Activity method. Other redundant forms would be: MainActivity.class.finish(); this.finish();…
-
0
votes1
answer532
viewsQ: Android - How to finish/finish an Activity?
How to close, finish, finish a Activity, after executing a method? In my project, I have two Activitys: Mainactivity (Home, Home screen) Editoractivity (Performs some simple tasks) I would like to…
-
7
votes1
answer171
viewsQ: Android - What is the difference between String and Editable?
When using the Edittext view, I saw that it returns an Editable data type and not a String. And it has different methods like getEditableText(). What is the main difference between String and this…
-
1
votes1
answer603
viewsQ: How to import a drawable automatically in multiple dimensions in Android Studio?
How could I add an image (drawable) in several dimensions at once, already creating high pixel density versions? hdpi xhdpi xxhdpi xxxhdpi Would have some way to expedite this task?…
android-studioasked Nakamoto 1,341 -
2
votes1
answer603
viewsA: How to import a drawable automatically in multiple dimensions in Android Studio?
There is a very valuable plugin that really helps speed up this task. It is called Android Drawable Importer. Basically it does the same thing as Add an icon using Vector Asset in Android Studio for…
android-studioanswered Nakamoto 1,341 -
0
votes1
answer3088
viewsQ: How to install plugins in Android Studio?
How to install plugins to increase Android Studio functions? Android Studio is a great tool that really helps decrease the time creating apps, but I would like to increase my productivity by adding…
android-studioasked Nakamoto 1,341 -
2
votes1
answer3088
viewsA: How to install plugins in Android Studio?
There are two basic ways to add a plugin in Android Studio. First, you can download in two ways: Download a zip plugin from Github or from Jetbrains Download directly through Android Studio settings…
android-studioanswered Nakamoto 1,341 -
0
votes1
answer110
viewsQ: How to clone a Branch in Android Studio?
I would like to know how I can clone a Branch of Github in Android Studio, because when I clone the Project, on the home screen, comes only the default version of the repository.
-
1
votes1
answer110
viewsA: How to clone a Branch in Android Studio?
I found that Android Studio automatically clones all Branchs at once. To access them, just go to: VCS --> Git --> Branches...…
-
0
votes2
answers1458
viewsA: How to hide the keyboard when the user presses a button?
Call this method: /** * Esconda o teclado */ public void hideSoftKeyboard() { if(getCurrentFocus()!=null) { InputMethodManager inputMethodManager = (InputMethodManager)…
-
3
votes1
answer2951
viewsQ: ERROR: android.view.Inflateexception: Binary XML file line #0: Error inflating class Textview
When using the LayoutInflater with this XML gives the following error: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
3
votes1
answer2951
viewsA: ERROR: android.view.Inflateexception: Binary XML file line #0: Error inflating class Textview
The problem is caused in the attributes of TextView of XML. Instead of being: android:textSize="?android:attr/textAppearanceSmall" Should be:…
-
44
votes2
answers2825
viewsQ: What is a Turing stop problem?
I’ve read and reread on Wikipedia, I’ve watched some 15 videos in English and Portuguese on this subject, I’ve read several articles on google, but I can’t understand. Why would she go into an…
-
1
votes1
answer81
viewsQ: Difference between android.content and android.support.v4.content
When I use Fragments or Asynctaskloader, two options for the same element appear: android.content and android.support.v4.content What’s the difference between the two? These are my project settings:…
-
3
votes1
answer4015
viewsA: Android Gradle - Error:Unsupported method: Baseconfig.getApplicationIdSuffix()
I was able to solve it with this way. Edit the build.Radle file to use an older version: classpath 'com.android.tools.build:gradle:2.3.2' I downloaded an older version of Gradle here:…
-
3
votes1
answer4015
viewsQ: Android Gradle - Error:Unsupported method: Baseconfig.getApplicationIdSuffix()
When importing a Github project using the Android Studio 3.0.1 I got the following error in Gradle: Error:Unsupported method: Baseconfig.getApplicationIdSuffix(). The version of Gradle you connect…
-
1
votes0
answers348
viewsQ: How to open an Imageview in full screen using Onclicklistener?
I have an app and would like to display an image in full screen. The screenshot below shows an application example. How could I put it in full screen, using onClickListener? And how could I do the…
-
1
votes1
answer237
viewsQ: Why inflate a Layout in Fragments instead of setting one already ready? Ex: setContentView(R.layout.activity_example)
I’m learning about Android and would like to better understand how this part of the system works. Instead of inflating a layout, it would not be simpler to do as when creating an Activity, for…
-
0
votes1
answer688
viewsQ: java.lang.Nullpointerexception: Attempt to invoke virtual method 'void android.media.Mediaplayer.start()' on a null Object Reference
I am learning Java and know basically what Nullpointerexception means. But I would like to understand why this occurs. This is the Activity code: package com.example.android.miwok; import…
-
0
votes2
answers417
viewsA: Move android studio to another computer without installing
If your computer is Windows, this will not be possible. Just by downloading the installer yourself you will achieve this. If it’s Linux or OS X, you can copy the folder where Studio is installed.…
-
0
votes1
answer90
viewsA: Installing Android Studio on Windows 10
I have been through something similar in Chrome. This is possibly caused by the computer being virus or having corrupted registry entries. The simplest and fastest way to solve, I believe it is by…
-
0
votes1
answer1711
viewsQ: Android - How to call a method from another class from onCreate()?
I am very new on Android. So if you can explain the logic behind the problem I would appreciate it. It would help me understand the problem and see how I could solve it if it happens again. In…
-
2
votes1
answer81
viewsQ: To serve Exampleunittest and Exampleinstrumentedtest in Android Studio?
Hello, I’m learning to develop on Android and would like to know the utility of these files and how Android uses them. I noticed that some applications sometimes do not have these files.…
-
0
votes1
answer77
viewsQ: Android - Method Invocation 'setOnClickListener' may Produce 'java.lang.Nullpointerexception'
I’m new to Android. Android Studio always warns me about this but I don’t know what it means. Method invocation 'setOnClickListener' may produce 'java.lang.NullPointerException' I would like to…
-
-1
votes1
answer1649
viewsQ: How to call a method within another method?
I am developing a quiz. Using as Radiobutton response. So far I have created using the onClick method on each Radiobutton, but it is not effective. So I’d like to call every question ask1();,…
-
0
votes0
answers28
viewsQ: What is (View view) on Android?
I usually find this in some parameter of an Activity. For example: public void onClick(View view){ //código } I would like to know better what you are referring to.…
-
4
votes2
answers123
viewsQ: How to apply attributes of a parent Viewgroup to child in android studio?
How to make children of a Viewgroup inherit a parent attribute? For example, I would like to set up layout_marginTop="16dp" for all Textview daughters <LinearLayout…