Posts by Luiz • 1,200 points
37 posts
-
2
votes1
answer69
viewsA: Model receive context on Android MVP
Actually, you don’t need a Context proper. What you need is a reference to a class that extends SQLiteOpenHelper. Let’s say, a class Database: public class Database extends SQLiteOpenHelper { ... }…
-
7
votes2
answers284
viewsQ: How to perform the correct flow deviation in an integration with multiple systems?
We have a system, which I will call A, which serves some customers. We are now performing the first integrations with the internal systems (ERP) of these customers. When we make, for example, a…
-
1
votes1
answer100
views -
1
votes1
answer499
viewsA: How to generate signed apk with different keys
There’s a way you can find out yes, but it’s not 100% sure it works. Use this tool: link 1 - Download the jar and place it in the same folder as your Keystore, then run the second command: java -jar…
-
1
votes1
answer174
viewsA: Error during upload request to Amazon S3
Aleff, I’m going to share with you a utility class I made myself to send images to S3. I still keep using it and it works super well: public class AmazonS3Utils { private static final String…
-
3
votes1
answer62
viewsA: What is this layout composed of?
There is not much secret Hugo, you yourself mentioned the components. It was probably used Card View. But it is also possible to achieve this in a raised layout. About the button at the end: It’s…
-
3
votes1
answer72
viewsA: Color by Actionbar
You can do it like this: getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.BLUE)); Or so: getSupportActionBar().setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(this,…
-
3
votes2
answers1877
views -
3
votes1
answer90
viewsA: Login method always returns false
Instead of if(s == pass), do: if(s.equals(pass)). Same thing for: if(c == log) Do: if(c.equals(log))…
-
0
votes1
answer185
viewsA: How to leave a Dialog with rounded edges (edges) via code without using xml?
Try this: @Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState);…
-
3
votes1
answer133
viewsA: Toolbar Android
To remove the arrow from Toolbar, just add this line of code into the onCreate() of his Activity: getSupportActionBar().setDisplayHomeAsUpEnabled(false); Add after you set Toolbar as ActionBar.…
-
3
votes1
answer129
viewsA: Automatic zoom
If you simply want to set a zoom (your map already being at the correct coordinates), you can do: CameraUpdate update = CameraUpdateFactory.zoomTo(13); // valor do zoom…
-
5
votes2
answers271
viewsA: Linear Clickable Layout
Set your layouts' XML to tag: android:clickable=“true” After that just treat the click as you treat the click on any other view, as in a button, for example.
-
2
votes1
answer349
viewsA: Snackbar with Action Button not aligned to text
Indeed, there are several examples, but in the examples the amount of large text is in the description and not in the text of the button, I believe that is the problem. Action button text must have…
-
1
votes1
answer293
viewsA: How to create a Datepickerdialog pre Lollipop
How did I even answer that question: Link. This Datepicker is only for Android 5.0 and above, if you want to use it in older versions, you would have to manually port it, but fortunately, some…
-
2
votes1
answer737
viewsA: Creating a datepicker Android Studio
This happens because the Datepicker of the second image is Android 5.0 (Lollipop). If you test on old devices, it will look like the first image. The best and easiest to do is to leave this way, so…
-
13
votes3
answers16185
views -
1
votes1
answer1963
viewsA: Send Arduino data to Android (ultrasonic sensor)
In fact, as far as I can tell, you’re not reading received data, since you don’t do it anywhere: InputStream in = bluetoothkSocket.getInputStream(); What you need to do is create another thread that…
-
0
votes1
answer23
viewsA: Vote indicator
If I understand well what you want, a simple progress bar that you can set the progress and color, you can use this library: Link It is simple to use and you can change everything dynamically,…
-
5
votes1
answer625
viewsA: Limit of Android Layout
You need to add your layout inside a Scrollview, thus: <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"…
-
1
votes1
answer755
viewsA: Change icone action back with Fragment
To overwrite the action of Up Navigation in Fragment, you need to do some things: First: In the onCreateView from Fragment, declare this method: setHasOptionsMenu(true); // Informa ao Android que…
-
1
votes1
answer69
viewsA: How to kill all dialogs on the screen at once?
Of course it is possible, if you have a reference to the three dialogs created, just you intercept the click on one of them and do something like: dialog1.dismiss(); dialog2.dismiss();…
-
1
votes1
answer203
viewsA: How to open a Dialog without darkening the Android background screen
You can set a specific theme for Activity, so it will not darken when opening any Dialog: <resources> <style name="Dialog" parent="AppTheme"> <item…
-
2
votes1
answer1523
viewsA: When I use a "Finish()" to terminate Activity Android uses some Activity ending animation by default?
If you simply want to close one Activity without opening another, you can do the following: overridePendingTransition(0, android.R.anim.slide_out_right); The parameters that this method receives…
-
7
votes2
answers155
viewsA: How to notify people that they have been invited to install an APP
What you can do, and it’s not that hard, is share your app link (playstore link) with the person that the user wants to share the list, using a Action Provider (Share Action), so one can choose how…
-
4
votes1
answer5160
viewsA: Make a graphic in android studio
Yes, you have to write code, because you have to provide the data with which the graphics will be built. However, fortunately, there are great libraries ready for this, here are some that I…
-
2
votes1
answer364
viewsA: Progress bar Does not work
In fact, you have 3 threads. In the second thread you create (remembering that the Main Thread, responsible for the interface, is created automatically when creating the application process, so this…
-
1
votes1
answer425
viewsA: Empty drawable folder Android Studio - None of the resolution options appears
You can switch to the Project view and check that the folders are there. If they are not, simply create them. After that, if you cannot view the folders as follows: Just create them. Right-click res…
-
2
votes3
answers2268
viewsA: Site within App
If you simply want to show the site "inside the app", just put a webview component in the app with the address of your site it will show the site in this view. Webview - Class Overview A View to…
-
-1
votes2
answers132
viewsA: Programming startup
Well, since you want to get directly into mobile development, the video lessons on this channel are best for beginners: Link Videos. He has already approached android and is starting with Windows…
-
0
votes1
answer1931
viewsA: What is the meaning of the kernel version?
I can help you with some things: 3.4.0 is the version of the linux kernel on which it is based. se.infra is the user account used in the system SWDB2914 #1 to compile. SMP comes from Symmetric…
-
0
votes2
answers142
views -
1
votes1
answer850
viewsA: Using another class method
Change the declaration of the Publish method from private to public, then you can access from other classes, or you can switch to protected, if both classes are in the same package: public void…
-
0
votes1
answer51
viewsA: Is it possible to inflate a class instead of layout using Fragmenttab?
You cannot inflate a class. And also you cannot put an Activity inside a fragmentTab. What you can do is to put in each tab a Fragment and control the class you use to inflate the layout of that…
-
2
votes1
answer5281
viewsA: How to import an android project as a module in Android Studio?
To import the classes from the other module, try adding this to the file build.gradle of your project: dependencies { compile project(':seuModulo') }
-
1
votes1
answer481
viewsA: How to create APP-like clock layout
To do this, you can use a list view but you will need to make a custom Adapter to popular this list view with a custom layout made by yourself. Already the tabs of this watch app I believe are made…
-
3
votes4
answers106387
viewsA: How to compare Strings in Java?
Use only . equals(). Example: String a = "1"; String b = "2"; if(a.equals(b)) return true;