Posts by Vitor Henrique • 1,113 points
40 posts
-
1
votes1
answer27
viewsA: Doubt regarding Textwatcher - Android
You’re adding the two TextWatcher at the same EditText. The right thing would be: EditText et_texto1, et_texto2; boolean ativa = true; @Override protected void onCreate(Bundle savedInstanceState) {…
-
1
votes2
answers667
viewsA: Go back to another Activity and pass parameters
The problem is in this section: if(extras != null && extras.containsKey("idFacebook")) { idUsuario = (String) extras.getSerializable("idFacebook"); } You use the string "idFacebook" when…
-
0
votes2
answers41
viewsA: Update Listview from a sorting Radiogroup
Your problem is in the anonymous method you created to pass the orderBy. Whenever the onCheckedChanged is activated, it only assigns a value to its variable orderBy and does nothing else, I believe…
-
5
votes1
answer250
viewsA: How to check the battery consumption of a device’s sensors?
Perhaps the best fit for your case is Powertutor, It measures detailed battery consumption, including some graphs for analysis. From the Android 5.0, it is also possible to use an adb command to…
androidanswered Vitor Henrique 1,113 -
2
votes1
answer761
viewsA: Use Dblookupcombobox with only one table and one Clientdataset
Yes Rodrigo, just create one TDataSource pointing to your Clientdataset, and on the property of DBLookupComboBox you arrow the ListSource for your TDataSource created, and the ListField and KeyField…
delphianswered Vitor Henrique 1,113 -
8
votes1
answer3604
viewsA: Coin mask on the field
Arthur, I have a class TextWatcherthat I use in my project, see if it suits you: public class MoneyTextWatcher implements TextWatcher { private final WeakReference<EditText>…
androidanswered Vitor Henrique 1,113 -
1
votes1
answer270
viewsA: How to open the file manager and when clicking on a photo, change the src of an Imageview?
First, define a standard code to identify the Intent: private static final int PICK_IMAGE = 11; Second, call the Intent who will be responsible for presenting the user which application he wants to…
androidanswered Vitor Henrique 1,113 -
0
votes1
answer948
viewsA: Access date/date folder in DDMS
It may be some permission issue, you need to have a device with root to view this folder. If your device has root, try the following steps: Open the command prompt Navigate to the folder where your…
-
2
votes1
answer155
viewsA: Expandablelistview using Recyclerview?
Yes, if it solves your problem and is easy to use and implement, it is a good solution, since today we do not have it in RecyclerView. In my projects I have, at times I needed to do this, but I…
androidanswered Vitor Henrique 1,113 -
1
votes2
answers308
viewsA: Delete an editText when modifying another
Yes, you will need to add one TextWatcher on your X1. Example: edtx1.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count)…
-
1
votes1
answer74
viewsA: Image framing
You can play a little with the android:scaleType of Imageview. By default it comes as fitCenter, so you see the image in the center, and the top and bottom black. Try for example set the value of…
-
0
votes1
answer285
viewsA: Insert button dynamically in Relativelayout
Answering your question of how to create a Button in the RelativeLayout, it’s simple, here’s an example of how to do it dynamically: Button btTeste = new Button(this); btTeste.setText("Teste");…
-
1
votes1
answer355
viewsA: Transparent Toolbar on an Activity only
Arthur, in the case of this image that you put, it uses a CollapsingToolbarLayout. If you want the same effect present in the image, do the following: Add dependencies to your build.gradle:…
androidanswered Vitor Henrique 1,113 -
2
votes1
answer534
viewsA: Mouse scroll button on a Quick report
Updated 05/07/2016 I found this other tip in the Embarcadero forum, even simpler than the tip below. procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean); var i:…
-
3
votes1
answer668
viewsA: How to call a alertDialog within a Fragment?
Exchange the this for getActivity() that will solve your problem. The reason is that he expects you to pass one Context in there, a Activity is a Context, for she extends from the class Context,…
-
0
votes1
answer327
viewsA: Error in app theme
To Activity that you’re trying to use the ActionBar class extension ActionBarActivity, in this case it is mandatory that you use the theme of AppCompat. Make your class extend Activity Activity and…
-
0
votes1
answer45
viewsA: Widget - Install automatically through the app
Unable to insert the widget automatically, you can open the widget selection for the user to choose from the click on the button: Intent pickIntent = new…
-
2
votes2
answers2229
viewsA: I can’t back up the mysql database using the dump
Robson, open your command prompt and navigate to the folder where your executable is mysqldump, probably in the folder bin mysqlserver. Example: cd\ cd "C:\Program Files\MySQL\MySQL Server 5.5\bin"…
mysqlanswered Vitor Henrique 1,113 -
1
votes2
answers69
viewsA: Alternative to Absolut Layout
Gustavo, you can continue using the RelativeLayout and set the margin of the component to position it where you want, is the only alternative to AbsoluteLayout where you fixed in the place you…
-
3
votes1
answer207
viewsA: Problems with android alarm
James, you can capture these date and time changes through a Broadcast, so whenever the user changes the device time, you can set the alarm correctly according to the new date. Some of the actions…
androidanswered Vitor Henrique 1,113 -
1
votes1
answer60
viewsA: App stops responding when running onStartCommand
The Service is not a Thread separate, it means that it rotates in its Main Thread thus making your application stop responding. To solve the problem you need to run your routine within a new Thread.…
-
2
votes1
answer541
viewsA: Broadcastreceiver gives error with BOOT_COMPLETED
Question answered in comments, just moving here. Exchange the context.startActivity(i) for context.startService(i). As for your class AlarmReceiver, I believe that what you need to update the…
androidanswered Vitor Henrique 1,113 -
5
votes1
answer1091
viewsA: Working with Base64 image in Android Studio
Andiie, first you will have to convert your String Base64 for a Bitmap, and from this create a BitmapDrawable. byte[] decodedString = Base64.decode(encodedImage, Base64.DEFAULT); Bitmap decodedByte…
-
2
votes1
answer291
viewsA: Android error while compiling missing lib - System cannot find specified file
Marcos, check in your build.gradle if there is any reference to this lib, if there is, remove the line. He’ll probably be like this: compile files('libs/httpcore-4.4.4.jar') After removing the…
-
8
votes1
answer9780
viewsA: How to make application running in the background all the time
What you need is a Service, it runs even when your application is closed, and you can make it run even if the user restarts the device. First of all, let’s create your service class Testservice.java…
-
1
votes1
answer258
viewsA: How to improve the performance of a key search?
Updated 26/06/2016 Guill, you can use a TPair to browse and find the value you need most efficiently. function KeyOf(Value: Extended): Int64; inline; var vIterator: TPair<Int64, Extended>;…
-
1
votes2
answers865
viewsA: Directory of Windows folders
Gabriel, you can use the ExtractFilePath(Application.ExeName) to return the current directory your system is installed in, this way it will work for any computer you use. Example: mApplicationPath…
-
1
votes2
answers1591
viewsA: Error while selecting emulator in Android Studio
Maybe the project you are trying to run is not compatible with the API configured in AVD. Try to check on your build.gradle if the targetSDK and the minimumSdk is less than or equal to the version…
-
1
votes1
answer753
viewsA: Understanding Httpurlconnection, Outputstream, Inputstream and Buffered Writers requests for Mysql database use
It is a complex question, but I will try to summarize what each one does and what it serves according to the documentation. 1 - HttpURLConnection This is an abstract class that contains the methods…
-
3
votes1
answer262
viewsA: Check if webview is loaded
You can implement the onPageFinished() class Webviewclient. webView.setWebViewClient(new WebViewClient() { public void onPageFinished(WebView view, String url) { } });…
-
0
votes1
answer167
viewsA: FAB + Nullpointerexception button
I’ve just found in your question that you stated the FloatingActionButton in your Fragment. This way you cannot use findViewById() directly from your MainActivity, and that’s the reason he’s getting…
-
1
votes1
answer242
viewsA: Webview - Update option appears only once in onReceivedError, see more
The problem is when you pass the function reload() to the WebView, it is reloading your error page that you have previously passed, not your original page. Do the following, before loading your…
-
3
votes2
answers92
viewsA: What is the name of the bar menu that youtube, whatapp and other apps use?
For starters, I suggest you read the documentation android official of how the implementation works. If you are looking for a quick and easy implementation, I suggest using the library Material…
androidanswered Vitor Henrique 1,113 -
0
votes1
answer35
viewsA: Know how many chips an Android device has
Since API 22 you can use the function getActiveSubscriptionInfoList (). It returns a list of type SubscriptionInfo of all Sims inserted into the device. Check the documentation.…
androidanswered Vitor Henrique 1,113 -
5
votes1
answer5404
viewsA: update Listview using notifyDataSetChanged();
First of all, declare Adapter and the list in a variable and make sure it is not already created. private LivroAdapter livroAdapter; private List<Livro> listaLivro; private void getLivros() {…
androidanswered Vitor Henrique 1,113 -
1
votes3
answers156
viewsA: ANDROID - ERROR: Unchecked cast: java.lang.Object to java.util.vector
Check before if the return method is of type Vector, because the compiler is accusing that you are making a direct conversion without checking before the return type. if (envelope.getResponse()…
-
1
votes2
answers667
viewsA: How to implement Swipe To Refresh on Webview?
1) You can use the method Reload(): browser.reload(); But be careful, because Reload only works if the page request is via GET, this method does not work with POST. 2) You can also use javascript to…
-
0
votes1
answer379
viewsA: Changing Listview font color and style does not work
On the link Junior Moreira sent, it contains the answer to his question. If you look further down on the answer, it gives the example using anonymous class. Follow the section of modified code for…
androidanswered Vitor Henrique 1,113 -
2
votes0
answers149
viewsQ: How do I get the form to update correctly?
I have a screen in Delphi that is constantly updated, is used along with a ratchet, every time a person puts the digital or enters the password, this screen is updated with the information of this…
-
0
votes1
answer503
viewsQ: Clientdataset closing after opening
I’ve been using Iphi xe6 for a few days now and I’m racking my brain with a problem. I have here the trio: Sqldataset -> Clientdataset -> Datasetprovider. When I open my application, I call…
delphiasked Vitor Henrique 1,113