Posts by Armando Marques Sobrinho • 828 points
46 posts
-
0
votes1
answer1315
viewsA: Dynamically create buttons
Voce can create a layout for the buttons: Filing cabinet btn_layout.xml: <?xml version="1.0" encoding="utf-8"?> <Button android:layout_width="0dp" android:layout_height="90dp"…
-
1
votes1
answer80
viewsQ: Fragment closes by clicking on Textview Kotlin
Save list! Next, I have an Activity where I call a Fragment using // ... val manager = supportFragmentManager val transaction = manager.beginTransaction() _Fragment = AcvtFragmentView() val args =…
-
0
votes2
answers157
viewsA: Icon SVG created with Inkscape is not properly imported
In case someone has difficulty with this, install this extension for Icelandic: Androidvector Here with me it worked right "This extension adds a new type for Android vector images in "Save As".…
-
0
votes2
answers277
viewsA: Recover information from a sharedPreference Android
try it o: // ... private SharedPreferences prefs; //... private void emUmMetodoQualquer(){ //... prefs = PreferenceManager.getDefaultSharedPreferences(this); ppf = prefs.getString("ppftexto",…
androidanswered Armando Marques Sobrinho 828 -
0
votes2
answers263
viewsA: Problem with Php and mysql - Simple login
Your problem in this system friend @Cayo Eduardo Silveira, is only due to the fact that the form code that Voce posted in the question, it does not have the field "user" which is verified in the…
-
0
votes1
answer149
viewsQ: Load specific content from a div that is in another jQuery html file
Save list! I need a help here, I have a file ". html" where I assemble a list that is configured like this: <!-- ... --> <header> function Open(id) { console.log(id); var x =…
-
0
votes3
answers443
viewsA: Get Integer value in final . 00 and float value in . 01 to 0.9
I usually do that in these cases: // ... float vf = 5/2; String [] vs = String.valueOf(vf).replace(".","_").split("_"); int vi = Integer.parseInt(vs[0]); // ... in the above case, I had problems…
-
0
votes1
answer46
viewsA: Error in select search
tries to replace: SQLiteDatabase db = Maindb.getInstancia().getWritableDatabase(); for: SQLiteDatabase db = Maindb.getInstance().getWritableDatabase(); from what I’ve seen, you must replace all…
-
0
votes2
answers66
viewsA: Permission system
Try it this way: <?php if (!empty($_POST) AND (empty($_POST['id']) OR empty($_POST['senha']) { if (`ativo` === 1)) { header("Location: principal.php"); exit; // Praque esse "exit" aqui, fiquei…
-
1
votes2
answers1278
viewsA: Pass product list to another Activity
yes, an array resolves, Voce fills it with its variables in Adapter and then passes that array to the other Activity in a Bundle, something like this: public List<String> minhasEscolhas = new…
-
1
votes1
answer221
viewsA: Check for active subscriptions with Billing Android App
I had a case that looked like this and I did so: public class MainActivity ... { // ... private boolean mIsPremium = false; static final String SKU_PREMIUM = "premium"; private IabHelper mHelper;…
-
1
votes1
answer178
viewsA: How to keep the countdown running in the background
You have to put it on your manifest: <receiver android:name="SeuBroadcastReceiver" android:permission="android.permission.RECEIVE_BOOT_COMPLETED"> <intent-filter> <action…
-
3
votes1
answer795
viewsA: Webview Android Studio with HTML5
You have to configure directly in html via style css, something like this: <head> <title>teu titulo da tua pagina</title> <!-- ... --> <!-- tem de ter isso no seu html…
-
1
votes1
answer67
viewsA: You can generate a . WAR in Android Studio
I advise you to use Intellij IDEA (Download) instead of Android Studio, in IDEA Voce you would have better access to tools for this, besides being able to do the same as android studio and have more…
-
1
votes1
answer178
viewsA: Dynamic total according to Android Numberpicker
You could try something like this: float totalGeral = 0.0f; // cria uma variável total geral np_Garrafa.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() { @Override public void…
-
1
votes2
answers2265
viewsA: Insert data when creating Sqlite table
so that Voce needs to use a table for this if this data is always static, so use an array states and that’s it, then: String [][] Estados = new String[][] { {"1","AC"}, {"2","AL"}, {"3","AM"},…
-
0
votes2
answers42
viewsA: Onlistitemclick not working on Listfragment
Try to do it that way: public class TiposFragment extends ListFragment { private ArrayList<Tipo> tipos; private TipoAdapter tipoAdapter; private int selecionado; @Override public void…
-
1
votes1
answer87
viewsA: Values are being sent nulls
Maybe if you were to do as below, it would solve: List<BigDecimal> gradesList = new ArrayList<BigDecimal>(); List<Integer> faultsList = new ArrayList<Integer>();…
-
1
votes2
answers197
viewsA: According to Like does not work Sqlite
So @genSkywalker that I know, "OR" works with "LIKE" on sqlite. You need to assemble your query using colunatbX LIKE '%string%' OR colunatbZ LIKE '%string%' or something like. Dai @Marcelowq, to…
-
0
votes1
answer185
viewsA: Listview update does not work
try to do it o: // ... @Override protected void onPostExecute(List<Cep> results) { HashMap<String, String> endereco = null; // ... } adapter = new SimpleAdapter(EnderecosActivity.this,…
-
1
votes1
answer109
viewsA: How do I maintain and display Countdown when leaving the app?
Okay, come on then: first, Voce needs to initialize the Service: import android.app.Service; import android.content.Intent; import android.os.IBinder; public class ServicoIniciadoNoBoot extends…
-
2
votes1
answer4092
viewsA: When should I use each log level in Android Studio?
According to the official website of android studio help, https://developer.android.com/studio/debug/am-logcat.html, hereafter translated: In the Record Level menu, select one of the following…
-
0
votes2
answers337
viewsA: Problems with reading database [Sqlite]
Yeah, it really lacks information, but from what I could see in the code posted, you should have done something like: public ArrayList<String> getFromDb(){ ArrayList<String> stringList =…
-
1
votes2
answers121
viewsA: Animation when modifying Linearlayout height
Well, since you were specific in the amount of code, the best outcome would be this: LinearLayout ll = (LinearLayout) findViewById(R.id.teste); ll.setOnClickListener(new View.onClickListener() {…
-
0
votes1
answer134
viewsA: Google Play Valid Privacy policy
Do it this way -> you can take this example here: https://media.termsfeed.com/pdf/privacy-policy-template.pdf, translate to the language(s) you implemented in the application and put it all in a…
androidanswered Armando Marques Sobrinho 828 -
3
votes2
answers821
viewsA: Error while trying to display a vector (SVG) imageView!
Probably this error is because Voce is trying to grab the file as an Assets item "SVG svg = Svgparser.getSVGFromAsset(getResources(), R.raw.Tree);",but probably the Assets folder has not been…
-
0
votes6
answers422
viewsA: How to "call" this correctly?
as @Pagotti commented, "this" refers to a class and is only available within that same class, so in the case here, it would be best to: spiner.OnItemClickListener listener = new…
-
0
votes2
answers55
viewsA: Fileoutputstream fails in context
you did so o: // ... try { // ... fileOutputStream.close(); } catch (IOException ex){ //... } to work, you need to do something like this: // ... PrintWriter writer = null; try { FileOutputStream…
-
1
votes1
answer321
viewsA: rating Bar does not get certain numbers (integer) of stars
opa, entaum confirma ai se isso que Voce precisa <RatingBar android:id="@+id/ratingBar" style="?android:attr/ratingBarStyleSmall" android:layout_height="wrap_content"…
androidanswered Armando Marques Sobrinho 828 -
1
votes1
answer185
viewsA: Does any url open in webview?
try so o: public class WebViewClientImpl extends WebViewClient { private Activity activity = null; public WebViewClientImpl(Activity activity) { this.activity = activity; } @Override public boolean…
-
3
votes2
answers143
viewsA: Separating a String, how do I do?
Since you know the contents and particularities of your string, do so Split the string into two: String [] separada = url.split(";"); this separates the url string into a string array "separate"…
-
0
votes1
answer62
viewsA: Format the Chronometer
As Voce said to already have the formatted text being displayed, it should be in some textview or something like that, am I right? so just convert this hour into a string, try something like this:…
androidanswered Armando Marques Sobrinho 828 -
1
votes1
answer581
viewsA: Metodos de Intent para enviar email
Okay, come on, come on: 1 - setType(): Defines an explicit MIME data type. - This is used to create intents that only specify a type and not data, for example to indicate the type of data to return.…
androidanswered Armando Marques Sobrinho 828 -
2
votes2
answers1540
viewsA: Swap a variable from True to False and vice versa
have several shakes to do this,: public class mycActivity ... { boolean vaiserfalsedepois = false; // ... meubotao.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View…
-
1
votes2
answers608
viewsA: How to change the color of the floating button and insert a text into it
better if you can do it programmatically, for example, at any event of your Activity you can do: public class MinhaActivity extends AppCompatActivity { Button meubotao; // ... @Override protected…
-
2
votes4
answers10625
viewsA: Constructing SQL tables - use or not fields with Not Null?
"... it must be Not Null, but in other fields, what is the need to use Not Null? ..." This accuracy will depend on the field being referenced in some relation that you do in the DB layer, otherwise,…
-
2
votes1
answer1620
viewsQ: How to filter html text and display div according to the found text
Save list! I need a little help here I have the following tags in html: <html> <body> <div id="div01" style="display: none"> <p> esse texto está aqui para ser…
-
2
votes1
answer67
viewsA: How to name the app version in Google Play Developer Console to put into production?
Hello @Thiago Philipp Note that Voce has two codes for an app version, the "Versioncode" and the "Versionname", versioncode is a control number for the store, only Voce will see this number and…
androidanswered Armando Marques Sobrinho 828 -
0
votes1
answer79
viewsA: Image and text autocomplete
I believe that the best way to solve your problem would be to put the images in the Assets folder, which is always better if this folder is created in ".. /app/main/Assets", in my case, I use this…
androidanswered Armando Marques Sobrinho 828 -
0
votes1
answer52
viewsQ: Apertium-Caffeine
I lowered the. jar from this library but has nothing, no example of how to use it in java, anyone here has used or knows how to use it in a java project I also downloaded the lttoolbox-java but ta…
-
0
votes1
answer423
viewsA: java.lang.Numberformatexception: Invalid int: ""
You’re doing it wrong, here’s your . xml fixed: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"…
androidanswered Armando Marques Sobrinho 828 -
1
votes1
answer101
viewsA: While inside mail function
There are several ways to do this, one of them would be to assign some variable to the type text and rewrite in that variable the text inside the loop with whatever you want, I would do something…
-
0
votes2
answers718
viewsA: File upload via PHP does not work, no error returned (localhost, XAMPP, Ubuntu)
It must be because of that line here: <input type=\"file\" required nome="arquivo" /> Voce has to exchange for: <input type="file" required name="arquivo" /> and if it is already known…
phpanswered Armando Marques Sobrinho 828 -
1
votes1
answer711
viewsA: Clicking on "Show More" button displays only 1 more result
It must be because so, Voce is creating several div’s with the same id="photos" inside your loop, tries to do so ó: $query=mysqli_query($db,"select id_album, nome, foto from albuns order by id_album…
-
4
votes1
answer1269
viewsA: assign variable with id dynamically via jquery
Thank you @Sergio! your tip helped me a lot... solved the problem using a part of it, there is the solution: $(document).ready(function(){ $('button').on('click', function() { var id = this.id; //…
-
4
votes1
answer1269
viewsQ: assign variable with id dynamically via jquery
Hello What I need is this: have a form and on it I mount inputs whose values are the data of a table I run in a loop, I assign an id to each of these imputs with the field name and the number of an…