Posts by Wakim • 10,455 points
263 posts
-
4
votes1
answer299
viewsA: Run a GCM function before uninstalling app
There is no Intent/Receiver or "callback" that your application may notified of its own uninstallation. There is a Broadcast of ACTION_PACKAGE_REMOVED1, which is shot to all receivers who are…
-
5
votes2
answers9331
viewsA: How to change the Text Color of a listview?
From what I understand, you want to change the color of all the items in the ListView. How are you using the android.R.layout.simple_list_item_1, which is provided by Android and is using a…
-
1
votes2
answers2001
viewsA: Create a link with data and go through post
This question is very interesting, I recommend making the solution using a form, which can be hidden from the user. I can’t think of a way to open a new tab using a POST without using a form. Edit:…
-
1
votes1
answer479
viewsA: Failure [INSTALL_FAILED_OLDER_SDK]
Unfortunately when using the L version as targetSdkVersion, he forces the minSdkVersion whether L also, whether declared independent minSdkVersion like 15. In this case you could use SDK 20 or 19 as…
-
4
votes1
answer5449
viewsA: Change text from Textview to an Android Fragment
There’s been a mistake in that code, referring to Fragment but this code is being executed in a Activity correct? I say this because only the class Activity (apart from the Views) has the method…
-
1
votes1
answer248
viewsA: Crash when implementing tabs and swipeable views
Error is in your method getItem. Your Adapter has 3 Fragments correct? But by doing the switch, is skipping index 2 and going to the 3 that does not exist. Logo on index 2 it returns null generating…
-
6
votes1
answer3345
viewsA: OK button of the Android Keyboard event
I usually do it that way: <EditText // Demais atributos do seu EditText android:maxLines="1" android:lines="1" android:inputType="textImeMultiLine" android:imeActionLabel="@string/pronto"…
-
3
votes2
answers2122
viewsA: what is tools:context in layouts files?
Basically the tools:context is used to tell which Activity that the UI Editor should use to choose a theme to render its layout. And this is related to the Activity Chooser in the IDE (Android…
-
2
votes3
answers152
viewsA: Android service runs only the first time
I wondered what could be the mistake and by the way it was made, although not recommended, it works (in theory). Looking at his code, he should recreate the Service (calling for onCreate) every time…
-
11
votes3
answers3288
viewsA: Working with delay’s on Android. Best approach?
I’ve had the same question you’ve had, so I’m gonna risk an answer. I believe it is better to start with a very important concept on Android, which is the Looper. Looper The Looper is a class that…
-
2
votes1
answer327
viewsA: Android: Improper layout change due to animation
Change the Context passed to the LayoutInflater, passing the Application because there is probably a loss of information regarding the theme of Activity. You can use:…
-
1
votes2
answers65
viewsA: Fopen typecast for comparison with NULL
I believe the problem is how you parented the expression. I made a code with several attribution combinations, the problem in your case is that the second part of the expression was indice =…
-
1
votes2
answers652
viewsA: Calling a function when a Fragment is closed
For this type of information on the Dialog, the class DialogFragment implements two interfaces: A DialogInterface.OnCancelListener and the DialogInterface.OnDismissListener that provide the…
-
2
votes2
answers77
viewsA: How to leave the fields with the same style?
You can create a style with all the attributes in common and use it in your EditText. You’d have it in your file styles.xml: <?xml version="1.0" encoding="utf-8"?> <resources> <style…
-
0
votes1
answer464
viewsA: Android Gridview
I believe you need to wear one AdapterView.OnItemClickListener in his GridView, so can be notified when an item of your GridView is selected. The code would be something like: public class…
-
1
votes1
answer451
viewsA: Use interface implementation in a Fragment
The problem is that when you display the DateTimePickerFragment for NewEventFragment, the NewEventFragment is never passed as parameter in onAttach (Due to the life cycle of Fragment, he is…
-
1
votes1
answer104
viewsA: Component created does not get the width of the screen
To force the HorizontalScrollView occupy all available space in the parent use attribute fillViewport="true" in the component declaration in XML.
-
4
votes1
answer182
viewsA: Using variable as attribute name when making $.post
You are creating the object in the format JSON, that does not support variables as attribute name. I suggest creating the object and setting the field using the variable, thus: var NomeCampo =…
-
1
votes1
answer221
viewsA: Problems accessing class attributes when creating java-based System action
To access class attributes MemoriaView you need to use MemoriaView.this.atributo to specify that the this the one you refer to is the one of the most external class. The this in that context is the…
-
3
votes1
answer385
viewsA: Use of Spinner on Android
The fact that he always goes into the first if is that String.valueOf is always different from null. I believe what you want to do is if in relation to the item of Spinner and for that you need to…
-
4
votes1
answer131
viewsA: Problem with Saving txt File to C++
This behavior makes sense when opening the file with fopen("nome_do_arquivo","w"), you are opening in mode writing. According to the documentation: write: Create an Empty file for output Operations.…
-
1
votes2
answers691
viewsA: Reading properties file
I recommend putting the file dados.properties in the briefcase res/raw. By putting in this folder you can get one InputStream for any file in this folder with that code: public InputStream…
-
6
votes1
answer43
viewsA: Remove hyperlink from an image with jQuery
Yes, it is possible. jQuery has a function called unwrap, that removes the parent from the element leaving the element (son) in its place. In the specific case would be: $('img').unwrap(); Of course…
-
4
votes1
answer7556
viewsA: How to get the value of a particular item from the java android listview
According to the documentation of AdapterView.OnItemClickListener, to View v passed by parameter is the View of the item clicked on ListView. Soon to recover some View inside this item just use it…
-
2
votes1
answer853
viewsA: Popular a Listview with Arrayadapter
Now I understand the problem with your code, actually there is a small error in Adapter, forgot to return the actual data. The class with the hits is: public class ClienteAdapter extends BaseAdapter…
-
1
votes1
answer565
viewsA: Get click id on the previous Fragment listview
How you’re instilling the Fragment just before adding it in the layout, you can pass the position by Argument, and it becomes available in any part of the next Fragment. I left commented the changes…
-
2
votes3
answers757
viewsA: Problem with Return false in Javascript
The error occurs precisely by return false;, that does not let the event started on the submenu link finish running. Include the following code right after the registration of handler to the click…
-
2
votes1
answer4810
viewsA: How to Select Java Listview Item
You must register a OnItemClickListener or a OnItemLongClickListener in his ListView, when an item is selected (ItemClick) or pressed (ItemLongClick) you will be notified. To listen for these events…
-
3
votes1
answer1558
viewsA: Access playlist music Android
I believe what you are looking for is exactly the API of MediaStorage android. It has so many ways to access any type of media that is in the device’s internal and external storage. To get all the…
-
4
votes1
answer73
viewsA: Difficulty to understand "extends Application"
The code that causes trouble is precisely the one that posted: (...) public void onCompleted(GraphUser user, Response response) { if (user != null) { Usuario usuario = new…
-
2
votes1
answer1232
viewsA: ADB does not recognize Android 4.2.2 in Ubuntu
1. Ubuntu You should go as sudo up to the directory /etc/udev/Rules. d/ and edit the file 51-android.Rules (if it does not exist, create). Add that line: SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4",…
-
0
votes3
answers790
viewsA: Image upload problem Laravel/Intervention
I’m not familiar with Laravel, but I suggest a change in the file name. I don’t know which O.R. is using, but I suggest removing the character ":" of your file name, since in Windows and Linux it is…
-
7
votes2
answers12623
viewsA: How to use a subdomain as if it were a domain
At @Renan’s suggestion, I will try to elaborate my answer better, although I am not an expert on DNS :) But there are two ways (as far as I know) to create subdomains for a given host. Or by records…
-
1
votes1
answer1057
viewsA: Problem updating Listactivity using a custom adapter
I will suggest a solution to the problem of Fragment but I have another suggestion to improve the way you update your list on ActivityList. From what I understand, you update the list whenever your…
-
3
votes2
answers155
viewsA: Convert Qvector<Qstring> to int in C++
Incredible as it may seem (so big that is the QT) class QString has a method that makes the Parsing of its contents to whole, gives a look at QString.toInt.…
-
10
votes1
answer1755
viewsA: What does popBackStack()?
I’ll risk my answer :) I believe we all know what it is Fragment. I am going to start from this principle, if anyone reading this answer does not know I recommend reading this question. The central…
-
1
votes1
answer585
viewsA: How do I add a different object to a list whenever using the add?
As it is generating some problems, I will put the excerpt of the comment (edited) that possibly helped solve the problem: I think if it can be supplemented, best for all. When you did: tree…
-
18
votes1
answer5967
viewsA: What’s the difference between drawing in Activity and in Fragment?
Since no one has ventured, I’ll try to help with what I’ve learned about Fragments. Before entering briefly into details, I would like to clarify that the loss of performance (cost x benefit) is…
-
2
votes1
answer634
viewsA: Android with external barcode reader
You can force the display of Soft Keyboard for the entry field of the code, regardless of whether the EditText has focus, using the InputMethodManager in that way: EditText yourEditText = (EditText)…
-
4
votes2
answers382
viewsA: Click on the button does nothing
The problem in this case is that you will not be able to use the setContentView after initializing the Activity in the onCreate. You will have to start a new Activity with that layout. And it can be…
-
1
votes1
answer1916
viewsA: Android: How to update Actionbar and Drawerlayout title and items at runtime?
I’ll guess you use the DrawerLayout of Support Library v4 and ActionBar from Support Library v7, but I have two suggestions to solve this problem: Simple mode: restart the Activity, believing that…
-
1
votes1
answer144
viewsA: Responsiveslides with JSON as Datasource
As no one has expressed more, I will give my opinion (not an answer, but does not fit in a comment), if you want I can delete. From what I saw in the repository Github, the author does not support…
-
2
votes1
answer965
viewsA: Admob - Problems with Ads in APP
I looked at the Droidgap code in the Cordova. And from what I understand, it is not possible to do the way you did, including an android layout of yours with Adsview, because it always overwrites…
-
0
votes2
answers326
viewsA: Form does not commit because of jquery’s $("#div"). attr("disabled",true); command. What to do to resolve?
Why don’t you use the onsubmit form to carry out the lock? $("#form").submit(...); // Ou $("#form").on('submit', (function(){ $("#button").attr("disabled",true); $("#button").animate({opacity:0.2});…
-
4
votes1
answer133
viewsA: How to make getHeight() not return 0 before the Draw method?
There is a way to take the values of getHeight() correctly, and I usually do so, but using Activity, not within your View: public class ExampleActivity extends Activity { //... Código @Override…
-
1
votes2
answers4866
viewsA: Java.lang.String cannot be cast to error , when capturing data in Jcomobox to save
I didn’t see the declaration and initialization of your Combobox but the class JComboBox is parameterized. Soon you can declare something like: JComboBox<Funcionario> combo = new…
-
1
votes1
answer1481
viewsA: How do I get foreign key values on a Jframe form
You can use a JComboBox. Where each item of ComboBox has a label and a value. The value you can use the id to facilitate the insert. To fill the JComboBox, suffice in the maker of JFrame load…
-
1
votes1
answer409
viewsA: Daughter entity does not receive its parent entity merge id via @Cascadetype
Looking at your code, I think that’s correct. But I suggest an amendment: public static void main(String[] args) { EntityManagerFactory factory = Persistence.createEntityManagerFactory("post");…
-
1
votes1
answer859
viewsA: How do I add a matrix to an edge of the graph?
The problem with your attribute grafoo, it is a matrix of int primitive, when to receive another matrix, need to be more complex. There are two approaches: The first is to use the Object type in…
-
3
votes3
answers1091
viewsA: Is it possible to attach an Android res/drawable file to an email using Javamail?
Searching, I found a solution I couldn’t test because I’m not home... At first, you can access your app’s drawable with a protocol-based URI android.resource. To access a drawable through the File…