Posts by Edson Santos • 416 points
40 posts
-
-1
votes1
answer92
viewsQ: How to delete an external library
How do I delete external libraries that generate version 28 incompatibility. It already deletes manually in the directory. idea/Ibraries and also clicked on them and had them deleted in both cases…
-
0
votes1
answer59
viewsQ: Androidstudio giving unusual error while opening project fonts
Androidstudio is misopening the project files, see one of the cases the source Cmapbuffer.java. Just to reinforce, it’s the same file being opened by the OS text editor and the IDE, at first it…
-
1
votes1
answer74
viewsQ: In android 8 Service stops and does not reboot when Activity ends
I am testing a service but when Activity is terminated the service to temporarily, then the service tries to restart, is called the onCreate method but onDestroy is called in sequence and the…
-
1
votes0
answers25
viewsQ: Textfield with initial value in Constraintlayout
I am unable to identify the error in the XML specification, with each character added at the Textfield startup, which is inside the Constraintlayout, the root Linearlayout increases the height. In…
-
0
votes0
answers161
viewsQ: Cannot resolve Symbol 'Theme' in the Styles.xml file
Is giving the following error message: Android Studio 3.2.1 build.Gradle (Project:xxx) dependencies { classpath 'com.android.tools.build:Gradle:3.1.2' } I tried the following: 1) I deleted the .…
-
1
votes0
answers39
viewsQ: Change menu text Accelerator
I created the following MenuItem, MenuItem item = new MenuItem("Alterar"); KeyCodeCombination acc = new KeyCodeCombination(KeyCode.ENTER, KeyCombination.CONTROL_DOWN); item.setAccelerator(acc); It…
-
0
votes1
answer422
viewsA: Make the button visible at a given time
Call the method start() after the creation of the object and see if it works TempoCorridoX = new CountDownTimer(15000, 50) { @Override public void onTick(long millisUntilFinished) { //// nada faz }…
-
1
votes1
answer1666
viewsA: Resize image to screen size
If the idea is to put a background image in Activity do the following: sua_activity.xml <?xml version="1.0" encoding="utf-8"?> <FrameLayout…
-
1
votes1
answer58
viewsA: Adjust the size of the popup window
When creating the Popupwindow object change to: PopupWindow pw = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,true); ** no need to call the method…
androidanswered Edson Santos 416 -
0
votes1
answer58
viewsQ: Adjust the size of the popup window
How to adjust the popup window size to the layout content? I tried, unsuccessfully, the following: LayoutInflater inflater = (LayoutInflater)…
androidasked Edson Santos 416 -
0
votes2
answers61
viewsQ: Edittext with ellipsis
In Edittext, when text cannot be displayed completely and lose focus, has some tag that can be set so that it displays the text with ellipsis?
-
1
votes2
answers620
viewsA: onClick in edittext that cannot be editable
Do you want Edittext to receive focus without being editable? If so, just call editText.setKeyListener(null); If you want it to be editable again, before setting the System to null, get and store…
-
1
votes1
answer73
viewsQ: Instant Run message on Androidstudio
I upgraded Androidstudio to 2.2.2 and the SDK to API 25, in build.gladle put targetSdkVersion 25. When asked to run the application (physical device) appeared the following message: What needs to be…
-
2
votes1
answer63
viewsQ: getLastLocation sometimes returns null
I use the following code to get the user’s location: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ... m_api = new…
androidasked Edson Santos 416 -
2
votes1
answer2309
viewsA: How to use an API on an Android Studio project?
Google offers several Apis, for example: If your application will work with maps, in your project (left side in android studio) go to Gradle Scripts and open the build.Radle file ("Modulo seu app").…
-
2
votes2
answers307
viewsA: Listview does not appear in the emulator
Create a Textview to display when the list is empty. 1- In the list layout file ... <ListView android:id="@+id/list" ... /> <TextView android:id="@+id/listEmpy"…
-
0
votes1
answer65
viewsA: Transparent statusbar
Create a style with colorPrimaryDark with transparency <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> ... </style> <style name="AppTheme.StatusBar.Transparent"…
androidanswered Edson Santos 416 -
0
votes1
answer65
viewsQ: Transparent statusbar
How to implement transparency in statusBar? *minSdkVersion 16 compatibility API…
androidasked Edson Santos 416 -
0
votes2
answers164
viewsA: Postgresql pg_hba.conf
Configure host all 127.0.0.1/32 md5 host "all banks" "all users" "localhost" "password-protected" So the database can only be accessed as localhost.…
postgresqlanswered Edson Santos 416 -
1
votes2
answers164
viewsQ: Postgresql pg_hba.conf
I have a server with a Servlet + a postgresql database. I would like only Servlet to connect to the database. When I set up pg_hba.conf with local all md5 Servlet cannot connect to the database.…
postgresqlasked Edson Santos 416 -
0
votes0
answers31
viewsQ: Android listview view view listViewItem
I have a listview that part of the line is only displayed when expanded. The problem is that when the line is expanded next to the bottom of the screen you cannot see all items. How do I know if the…
androidasked Edson Santos 416 -
3
votes1
answer116
viewsQ: How to change the background color of Popupmenu?
To change the background color of the Popupmenu and set the height of the shadow. The only result I had was setting the popupBackgound in Styles.xml the problem is that it loses the shadow.…
-
0
votes1
answer254
viewsA: How to finish running the app in the emulator
In some situations the emulator caches the application instance, that is, you make changes to the code, ask to run again and it loads the previous instance of the execution without reflecting the…
-
0
votes1
answer95
viewsQ: Android composite control Textview + Switch - click method
I made a layout of a Textview + Switch button. How do I set the onClick method in prefs_activity.xml and receive notification in the class implementation? layout/preference_switch.xml <TextView…
-
1
votes1
answer205
viewsQ: Android error - Must specify preferenceTheme in Theme
I created a layout (preferences.xml) in the res/xml directory based on Preferencescreen. I implemented a class derived from Preferencesfragmentcompat public class PrefsFragment extends…
-
3
votes1
answer479
viewsQ: How does the allowBackup tag work?
Write to user device with getSharedPreferences("config" ,Context.MODE_PRIVATE) login name and some application settings. Tag allowBackup as true implies saving only this information? When the…
-
1
votes1
answer83
viewsA: Landscape mode does not work
Check if the structure of your resource directory looks like this: If no follow the following steps: 1) On the layout directory click : New -> Layout Resource file 2) In the File Name dialog put…
-
3
votes1
answer291
viewsQ: Different source code for release/debug version
I saw that in android studio it is possible to have an Androidmanifest.xml for the debug version and another for the release version. Well, I have an "Appmock.java" file with constants for testing.…
-
0
votes1
answer47
viewsQ: On android which class corresponds to javafx Image class
I have image server implemented in javaEE, in javafx I make an image request to the server that returns an array of bytes, with this result create the image on the client side: ** Image in PNG…
-
1
votes1
answer139
viewsQ: Error while publishing Java 7 - Java 7 vs Java 8
I rented a VPS server and when trying to connect my android application with Java EE, I received the following message: type Exception report message app/server/CSelerServer : Unsupported…
-
0
votes5
answers1896
viewsA: Change Button Background
Try int color = 0x8000FF00; // 50% verde Button button = (Button) findViewById(R.id.btnTeste); button.getBackground().setColorFilter(color, PorterDuff.Mode.MULTIPLY); The result is very good and you…
-
0
votes2
answers602
viewsA: Listview with two lines
See if the example helps: public class CTesteActivity extends AppCompatActivity { protected ListView lstBse; protected Button btnAdd; protected ArrayList<RowData> m_data; protected…
androidanswered Edson Santos 416 -
2
votes2
answers602
viewsA: Listview with two lines
That’s right, it is a pre-formatted two-line listview, the values must be accessed using the text1 and text2 Ids. Only this class has been deprecated since API 17, where they recommend using an XML…
androidanswered Edson Santos 416 -
0
votes1
answer1770
viewsQ: Android Relativelayout align items
I am not being able to align vertically in the center the items of the third line marked in the image. This is a layout of items in a listview. I’ve tried Gravity="center", layout_gravity="center",…
-
0
votes2
answers1108
viewsA: Google maps android already open looking for current position
See if the example helps, just do not know how to run emulator. ** In Androidmanifest.XML add <uses-permission android:name="android.permission.INTERNET"/> <uses-permission…
-
2
votes1
answer104
viewsA: Make a mark on the Google Maps map itself
On the map you can add references with addMarker, addCircle, addPolyline and addPolygon. In the link image was probably used addPolygon. It also has addGroundOverlay, as well as Circle a Polyline…
-
1
votes1
answer254
viewsQ: How to finish running the app in the emulator
I’m building an application that caches remote data. Fact is, I change the remote data, finish the application in the emulator with back button. At the next run, done from the click on the…
-
0
votes1
answer82
viewsQ: Remove default map tags on android
I did not test, but apparently in Avascript you can remove the default marks from the map using Maptypestylefeaturetype - https://stackoverflow.com/questions/7538444/how-do-i-remove-default-markers.…
-
1
votes3
answers580
viewsA: Grab a JAVA array
Declare the variable vetTit[] as the class: public class NomeClasse { protected String vetTit[]; ... protected void metodoQueContemSwitch { switch(menu) { case 1: ... vetTit[]= new String[tam] ...…
-
1
votes2
answers144
viewsA: DistanceTo method (Select the nearest distance between markers)
See if this helps public class MyLocationListener implements LocationListener { private ArrayList<Location> m_location; private Location m_pointLocation; public MyLocationListener() { super();…