Posts by Lucas Santos • 1,197 points
36 posts
-
1
votes2
answers1296
viewsA: Generating Bitmap of photo taken
As noted in the comments of my first reply, it is incorrect, does not work properly on all devices. I could have excluded it but I’ll leave it as a form of consultation and understanding. A new…
-
0
votes2
answers1296
viewsA: Generating Bitmap of photo taken
As you said, the error is in the argument that is passing to the method getMiniaturaImagem(). This method calls for three arguments: ContentResolver cr, String imagePath, long imageId. In this case,…
-
2
votes1
answer349
viewsQ: Snackbar with Action Button not aligned to text
Hello, I wonder why my Snackbar doesn’t get the text aligned with the ActionButton, this happens only when the text is too long. I am placing an example image. Do you know how I make Snackbar to get…
-
1
votes1
answer185
viewsQ: Recylerview Horizontal as Whatsapp
I would like the help of you how to make this layout of the "Media" part in a particular Whatsapp Contact. Would this be CardView whole called "Media". It would be almost exactly the same way, I…
-
2
votes2
answers787
viewsA: How to view pager images as free market app and others
I was able to solve my problem based on the reply and comments from @Wakim. I suggest first reading his post and then seeing my code. The layout was very similar indeed as the "Whatsapp" on a…
-
3
votes2
answers787
viewsQ: How to view pager images as free market app and others
I’d like to ask you for help on how to make this layout like the Free Market app and so on, like Live Real Estate. The layout I need is equal to this image I’m putting below, It would be a Toolbar…
-
3
votes2
answers2742
viewsQ: How to backup the database to cloud and how to have the data synchronized across multiple devices?
Well folks my question is this. I have an App that has a local Sqlite database. I want to know if you have any library, framework, code that does the following: Backup that database to Cloud…
-
2
votes1
answer481
viewsQ: How to create APP-like clock layout
Good morning to you all. Could someone give me a help on how to create a layout similar to the Android clock APP? I would like to do something very similar with these screens. If you can help me…
-
2
votes1
answer368
viewsA: Android theme support (Themes) in custom components, using Appcompat-v7
Instead of inheriting from android.widget.EditText from your Custom Edittext, inherit this class and see if it works: android.support.v7.internal.widget.TintEditText Link to the class:…
-
0
votes1
answer1918
viewsQ: Return a query with all data from a table for android
Good afternoon guys, I’ve been having a question for a long time but I’m just trying to get it out now. I have an app that communicates with an online database remotely through a PHP Web Service. I…
-
5
votes2
answers2958
viewsA: What are Loaders? How to implement a Loader to load from the database without content Provider and how to implement a custom Loader?
Now let’s see how to use a custom Loader to load data from a custom Adapter. Attention, this answer is indicated for programmers who have at least a basic knowledge of: Activity Fragment Lists and…
-
11
votes2
answers2958
viewsQ: What are Loaders? How to implement a Loader to load from the database without content Provider and how to implement a custom Loader?
On the Internet, at least in my research, I found little material on Loader in Portuguese. That is why I record here this question, to have documented answers to the android programming community as…
-
15
votes2
answers2958
viewsA: What are Loaders? How to implement a Loader to load from the database without content Provider and how to implement a custom Loader?
Attention, this answer is indicated for programmers who have at least a basic knowledge of: Activity Fragment Lists and Adapters Custom Lists and Custom Adapters Loaders Introduced in Android 3.0,…
-
1
votes1
answer858
viewsA: Update Fragment UI after coming back from Backstack
I solved my problem using Custom Loader for my Custom Adapter. The difficulty was only in implementing the Loader, but thanks to this implementation, it was not necessary to communicate a Fragment…
-
3
votes1
answer321
viewsA: How to know which image was clicked in java
Just do it like this: @Override public void onClick(View v) { if( v.getId() == R.id.main_bancada ) { // Faça algo para essa View; } else if( v.getId() == R.id.main_aguarda ) { // Faça algo para essa…
-
1
votes1
answer858
viewsQ: Update Fragment UI after coming back from Backstack
Maybe the problem is simple, but either way, I’m stalling to do it. I know I would have been able to do this through interfaces, but I don’t want it that way. My app has only one Activity that…
-
1
votes1
answer1324
viewsA: How to create Listview with Sqlite data in Fragment
If you want you can use SimpleCursorAdapter String[] from = { id, titulo }; // Colunas que você quer exibir int[] to = { android.R.id.text1, android.R.id.text1 }; // ID's dos componentes que estão…
-
1
votes1
answer76
viewsA: Implementing Audiotrack Class in Static mode
At the startup of your AudioTrack has a space in an argument. Look closely: private AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, 44100, AudioFormat. CHANNEL_OUT_MONO,…
androidanswered Lucas Santos 1,197 -
0
votes1
answer3255
viewsA: Change custom spinner selector
Like I said in my question, my problem was: I wanted my spinner selector to be bigger, it could be the standard size and wanted another color, to get on the bottom of the layout. Let’s go to the…
-
0
votes1
answer3255
viewsQ: Change custom spinner selector
I created a custom spinner and a custom dropdown spinner, when using them, the selector is almost invisible and its color also does not help. I wanted my spinner selector to be bigger, it could be…
-
10
votes1
answer754
viewsA: What makes the for and what makes the brackets in an array?
You know what it means to be? For is a structure of repetition, great to iterate for arrays and listas. for (int i = 0; i <mat.lenght; i++) This line above means: For (for) a variable i of the…
-
4
votes1
answer532
viewsA: Problems with Adapter in Fragment
Although I put the class code adapter as a comment I believe I was able to visualize the error. The class ContactImageAdapter has a construtor waiting for a context, int, ArrayList<Contact>…
-
0
votes2
answers115
viewsA: Removing object from Arraylist, object is still there
Try to put inside the if rCoin = null;
javaanswered Lucas Santos 1,197 -
3
votes2
answers7797
viewsQ: Remove duplicate objects from List<Minhaclasse>
Guys is the following, I have a model class with attributes that store data returned from the database. For example: public class RelacaoTransformacao { /** ID do registro no banco de dados. */…
-
4
votes1
answer1755
viewsQ: What does popBackStack()?
I can’t understand or find anywhere that makes me understand what the method does getActivity().getSupportFragmentManager().popBackStack(); Not even reading the documentation I could understand,…
-
7
votes2
answers2984
viewsA: Google Play private app
If you have a company or work for one and it is registered in Google Apps for Business this is also possible and the way created for it. The name is called Google Play Private Channel. The company…
-
0
votes2
answers236
viewsA: Beginner Error with Onclicklistener
I believe your mistake of NullPointerException be on the line where you have that statement : Button button1 = (Button)findViewById(R.id.button1); You probably forgot to declare a button in your xml…
-
4
votes2
answers4442
viewsA: How to delete a specific Listview item?
Come on @GH_ see if this helps. Create a class called Others, this class will persist the data you want for a particular object, let’s assume it is a person, car, or anything. In your case will…
-
0
votes2
answers1429
viewsA: Image layout dynamically after photo is captured
I managed to make the layout thanks to the help of @Walkim, followed his example by modifying according to my needs. First I wanted the layout as the question, but I had to make modifications and my…
-
0
votes3
answers460
viewsA: How to implement dynamic "Up Navigation"?
I think you can do this in your onOptionsItemSelected() method and switch to the Home icon id in Actionbar. I could have done this in a project of mine the way I’m going to present you, but…
androidanswered Lucas Santos 1,197 -
2
votes3
answers1444
viewsA: Organize XML’s layout in the Android project’s Resources(res)
I organize like this: If the layout refers to a Activity, then the name will be activity_nome_da_classe If the layout refers to a Fragment, then the name will be fragment_nome_da_classe If the…
-
1
votes3
answers1740
viewsA: How to put caption in an Imageview
Following @Wakim’s tip for me on this question, you can do so: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
3
votes3
answers902
viewsA: Pass value to a java function
Represents a widget button. Buttons can be pressed or clicked by the user to perform an action. A typical use of an Activity button would be the following public class MyActivity extends Activity {…
-
0
votes2
answers6785
viewsA: Open device gallery
To open the android gallery just put this code: /** * (ISTO É UMA VARIÁVEL DE INSTÂNCIA) * Codigo para representar que voltou da activity que visualiza uma imagem. */ private static final int…
androidanswered Lucas Santos 1,197 -
1
votes2
answers6687
viewsA: How to Save Path of a Photo Taken from Camera on Phone in Path or String
@Guilherme you executed your code from a Samsung phone? Because I do not know if they are at all but on some mobiles Samsung occurs a bug saying that data of the method onActivityResult returns…
-
2
votes2
answers1429
viewsQ: Image layout dynamically after photo is captured
How do I create a layout exactly like this (The layout is equal to both left and right): I’ll explain how I intend to do this and if possible help me because I don’t know how to do it this way: I am…