Posts by Duanniston Cardoso Cabral • 449 points
18 posts
-
0
votes2
answers58
viewsA: Doubt with the firebase
There are many ways to solve this problem. Improving the architecture You can apply MVP or MVVM in your project and modularize your project more efficiently by making it weakly coupled, with this…
-
1
votes1
answer1543
viewsA: Double Click Android
Double click is not part of the mobile universe, only of desktop with use of mouse, users are not used to it in the applications, it is a bad decision of UX to use this approach in mobile. One of…
-
0
votes1
answer43
viewsA: Bugando Activity + Memory Error
The error is simple, exactly what is written java.lang.OutOfMemoryError: Failed to allocate a 2284037732 byte Common error for beginners, you are consuming much more memory than your phone supports,…
-
0
votes1
answer215
viewsA: How can I "keep" data from an Activity when rotating the screen?
To Activity’s To save the data static final String STATE_SCORE = "playerScore"; static final String STATE_LEVEL = "playerLevel"; @Override public void onSaveInstanceState(Bundle savedInstanceState)…
-
0
votes1
answer46
viewsA: Actionbar dynamic text size
I recommend separating the two texts in title and subtitle public void setTitles(String titulo, String subtitulo){ toolbar.setTitle(titulo); toolbar.setSubtitle(subtitulo); }…
-
0
votes1
answer154
viewsA: Measure access performance to Android’s Sqlite database
You can create mocks (sample data for input or output) in the Sqlite database and App. I suppose you’re already using the best Pattern for performance Android, with this at each request start you…
-
2
votes1
answer125
viewsA: Animate Linearlayout with Layoutanimationcontroller
You can use android:animateLayoutChanges="true" in its layout father. this will make the animations fadein and fadeOut of all daughter views, when you put them as VISIBLE, GONE, INVISIBLE and added…
-
0
votes2
answers330
viewsA: How to create notification with custom layout?
int NOTIFICATION_ID = 1; int icon = R.drawable.icon; long when = System.currentTimeMillis(); NotificationManager mNotificationManager = (NotificationManager)…
-
1
votes3
answers623
viewsA: What is the best way to share variables between 3 Activity’s?
You can use the method mentioned above by @Cicero Moura to create an application of your own, or you can create objects using the Singleton standard, or join the two solutions that I consider the…
androidanswered Duanniston Cardoso Cabral 449 -
2
votes1
answer1720
viewsA: Login screen on Android
Use Threads to do heavy work in your application, such as disk access, downloads, image processing, etc... read more. If you lock the main thread of the process, the application will receive a ANR.…
-
1
votes1
answer274
viewsA: How to save notification?
Lacked clarity in your question. Do you refer to android Notification? , if it’s just you add Notification.Builder builder = new Notification.Builder(getApplicationContext());…
androidanswered Duanniston Cardoso Cabral 449 -
2
votes3
answers2626
viewsA: How to exchange information between classes?
May I suggest 3 options 1 Option Use Singleton, or simply set a class to Static. public class Singleton { private static Singleton uniqueInstance; private Singleton() { } public static synchronized…
androidanswered Duanniston Cardoso Cabral 449 -
1
votes1
answer296
viewsA: ADB via Wi-Fi disconnects when I turn on USB accessory
This happens because when you connect the USB cable, the device will detect the USB again and activate as adb input port automatically. for this not to happen you need to force the device to use…
androidanswered Duanniston Cardoso Cabral 449 -
0
votes2
answers239
viewsA: Two Android Progressdialog one after the other
The way you put it was very generic, but you can put at the end of the 1 thread ( sending files) call the Dismiss() of the 1 Progressdialog, and soon after call the 2 thread (rename files) this…
-
4
votes2
answers2122
viewsA: what is tools:context in layouts files?
This attribute is used to make the layout relation with an Activity. For example. If your Activity uses a custom theme you define this theme in the manifesto, if you assign the tools:context to this…
androidanswered Duanniston Cardoso Cabral 449 -
0
votes1
answer671
viewsA: Android Fixed Paging
This might work for you. You can use the method onTouchEvent in your Activity as the example taken from the site android Developer. public class MainActivity extends Activity { @Override public…
-
5
votes1
answer79
viewsA: Is there a way to avoid the size specifications in the Android layout?
You can define one or several "Styles" for your project Ex. Your Textview will look like this: <TextView style="@style/TextWidth" android:text="@string/textOne" /> Your style will look like…
-
1
votes3
answers13164
viewsA: What are the default sizes of android images?
To help you in your first App and create the images for each density automatically recommend using the tool . Android Asset Studio…