Posts by Wakim • 10,455 points
263 posts
-
1
votes1
answer431
viewsA: Fragment within Viewpager calls no method
Following the source code of the project, what I understood has to be done is the following: 1 - Creation of the main Fragment FragmentStatePagerAdapter calls the getItem, soon you must return the…
-
2
votes1
answer290
viewsA: How to set up an Activity to take up all screen space?
To occupy every screen you have two options: 1 - By theme Just use/inherit the theme @android:style/Theme.NoTitleBar.Fullscreen. Remembering that you won’t have the ActionBar, can use the Toolbar to…
-
1
votes3
answers11860
viewsA: Textview break lines
Missed you concatenate the line break character (\n) every line you read. Your reading loop would look: while ((StringBuffer = bufferReader.readLine()) != null) { stringText += (StringBuffer +…
-
12
votes1
answer3466
viewsA: How to use include other Android Layout?
If you’re referring to tag <include />, it serves to include a "sub-tree" in the place where it is declared. In general it is widely used when you own a layout that can be reused in other…
-
1
votes1
answer628
viewsA: Android Transition between Fragments
In that case, I would recommend the interface OnBackStackChangedListener, that registered with the FragmentManager can handle any transaction event from Fragment's who manage records on BackStack.…
-
5
votes1
answer1120
viewsA: Is there any method that returns information about the smartphone?
I think by joining two classes you can get a large number of properties. android.os.Build VERSION.SDK_INT: API version in absolute number (10, 11, 22...). BOARD: The name of the inner plate, for…
-
1
votes1
answer639
viewsA: How to remove default options from Google Maps v2 Android
To remove these two buttons simply disable the MapToolbar using: GoogleMap map = ...; map.getUiSettings().setMapToolbarEnabled(false); More information:…
-
2
votes1
answer1645
viewsA: How to add items dynamically in a Listview that is inside a Fragment?
The problem is that you put a ListView within a ScrollView, which is unnecessary because the ListView already manages the items that are displayed in the space that is given for it to "render". I…
-
2
votes1
answer934
viewsA: How to add button in Maps?
An XML layout can only have one root, so you should tailor your layout, a suggestion would be: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
1
votes1
answer320
viewsA: I transferred an image from one imageview to another imageview in another
You can retrieve the Bitmap of ImageView and pass the argument via Arguments class Fragment. The class Bitmap implements the interface Parcelable, soon it is possible to pass it to a Bundle. To…
-
12
votes2
answers56744
viewsA: Run apps in Android Studio through mobile by USB
No root needed to debug your application on a physical device. To enable debug mode by clicking 7 times in the Build Number in mobile options. After enabling just check the option USB Debugging…
-
8
votes3
answers1383
viewsA: Legacy of screens - Android
Other answers have already given some alternatives, but I think I can add one more. My suggestion would be to create a layout unique as being a template and use a real ViewStub to define the dynamic…
-
3
votes1
answer569
views -
15
votes1
answer9427
viewsA: I can’t update my app on google play?
I believe you’ve changed that: <?xml version="1.0" encoding="utf-8"?> For that reason: <?xml version="2.0" encoding="utf-8"?> Not correct, because this is the XML version that is used in…
-
1
votes2
answers747
viewsA: How to return calculations performed in Service to Activity?
The problem you are having is because you are recovering the values before the onStartCommand have finished, so the values were not calculated because the calculation is asynchronous. My suggestion…
-
5
votes2
answers934
viewsA: Is it possible to use Actionbar on Android natively?
Actionbar can be used natively, remembering that Actionbar is the entire bar and not just the menu. I believe that the problem encountered is the presence of a physical menu on your device, is just…
-
5
votes2
answers579
viewsA: Is it possible to use stylesheet in an app?
Cannot use CSS in pure Android View’s. If you use WebView you can of course. But you can create Styles which may be associated with them by the attribute android:style, which would be similar to a…
-
1
votes1
answer774
viewsA: Download zipalign for Mac
Using zipalign is part* of the process to generate apk, it aligns all uncompressed features of apk to make it easier for Android to load them into memory using mmap()…
-
0
votes1
answer293
viewsA: List View and Normal Layout in an Activity
You must set a layout for your Activity that has the button and the ListView. In that case you’re just setting up the layout of the items of ListView with all the content of Activity. A simple…
-
3
votes3
answers2343
viewsA: How to use a Fragment button
To notify the Activity in order to no longer have coupling, use the standard Observer/Listener. 1. Create an interface that has all the events that can occur on Fragment and which depend on another…
-
1
votes1
answer179
viewsA: Error while trying to connect smack to openfire
The class org.jivesoftware.smackx.disco.ServiceDiscoveryManager belongs to the module of Extensions smack. Just include the jar of smack-Extensions by the jar of smack in your project.…
-
7
votes1
answer1571
viewsA: How to leave imageView behind the buttons?
To assemble a layout with overlap on the Z axis just use the FrameLayout. The FrameLayout draws the View's stacking them according to the order in which they were declared. Example: To bring a View…
-
1
votes1
answer76
viewsA: Custom view longClickListener does not respond
Sometimes this problem is because you have not implemented the method onMeasure setting the actual size of your Custom View using the method setMeasuredDimension. By default the size of View is…
-
4
votes1
answer98
viewsA: What is Actionbarsherlock for Android?
Those notes aren’t from Actionbarsherlock and yes of the Android Annotations. To Actionbarsherlock is responsible for providing an implementation of ActionBar for devices with Android version less…
-
3
votes1
answer1073
viewsA: Problem showing date on Android
To format an object Date more humanely just use the SimpleDateFormat. In the builder of your Adapter just create an instance: SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); And use in…
-
2
votes1
answer145
viewsA: Method not found:
You imported the class ActionEvent wrong package (AWT). You must import package class javax.faces.event.ActionEvent and not of java.awt.event.ActionEvent. This error is generated because JSF…
-
1
votes1
answer858
viewsA: Material style button bar layout
I believe the bar you’re referring to is the action area of a Dialog. I believe even that screen of Google Drive is a Dialog in Full Screen. To Dialog in Fullscreen they give another disposition of…
android-layoutanswered Wakim 10,455 -
26
votes1
answer2508
viewsA: How to develop two versions of the same application, one free and the other paid?
There is a pattern (not a Design Pattern in itself) Android/Gradle’s own to handle this. The prerequisite would be to use Android Studio and compile its apk using Gradle. Because it is Gradle that…
-
2
votes1
answer236
viewsA: Invisible radiobutton with spinner
Use setVisibility(View.INVISIBLE) works in the RadioGroup, is even better than setting visibility for all RadioButton's. The problem is understanding about the onNothingSelected. I didn’t really…
-
0
votes1
answer173
viewsA: Universal Image Loader error loading image
To fix the problem of missing class in the Classpath you need to include the jar of the library in the folder libs at the root of your project. It is automatically included in your project’s…
-
1
votes1
answer847
viewsA: Change Dialog title background color
You have two ways: Or overwrite the style’s Dialog every app in your theme. Or remove the title using the Dialog.requestWindowFeature(Window.FEATURE_NO_TITLE) in the onCreate, before anything. And…
-
1
votes1
answer94
viewsA: How to add Toolbar and Viewpager in the same Layout
Just add the reference to the schema of namespace tools at the beginning of your xml. Just like the other schemas: <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
android-layoutanswered Wakim 10,455 -
4
votes1
answer1085
viewsA: How to put items from a Listview into strings.xml
Exactly, the best way is to use the string-array within the strings.xml. You would have an element within the strings.xml, with the declaration of your array: <string-array name="categorias">…
-
1
votes2
answers4140
viewsA: Error opening Activity: The <application> stopped
The problem is that this initiating their View's in their declaration within the Activity. What makes the method findViewById be called on the builder of your Activity. And at that moment yours View…
-
1
votes1
answer164
viewsA: Doubt with JSON in Jquery Autocomplete
The function map translates an object (or list) into a list, where you must pass a function that does the transformation. It iterates over the properties and invokes its function to popular the new…
-
2
votes1
answer1890
viewsA: What is the real use of Sqliteopenhelper on Android?
I think the main idea of Sqliteopenhelper is the initial configuration of the application (whether in the first installation, where the tables have not yet been created) as for evolution (upgrade…
-
2
votes1
answer924
viewsA: Json upload via android GET
In general the URI's are defined by RFC 3986 (Section 2 - Characters) and may contain the following characters::…
-
4
votes1
answer65
viewsA: Android - Nullpointerexception Error
The problem is you’re looking for the View's of its layout before adding its own to the Activity, using the method setContentView. When you do that, he won’t find the View's that is asking in the…
-
3
votes1
answer1336
viewsA: How to deserialize JSON using Gson with generic list?
I believe these invalid characters come from the way you are reading, not from encoding as I assumed at the beginning. When you allocate a char vector with 2048 positions and use to read the answer.…
-
1
votes1
answer111
views -
1
votes1
answer96
viewsA: Error trying to fetch data
When you’re using the Cursor, should first use the moveToFirst. With this the cursor will point to before the first line. To access the data, use moveToNext checking whether the return was true. For…
-
1
votes2
answers986
viewsA: Dialog some after opening
When you write a <p:link>, the Markup generated is a link to the page itself. If the intention is just to have the link as aesthetic, not to navigate, just give a return false; after all the…
-
2
votes1
answer762
viewsA: JSF does not find component ID
Because they are in different forms, the CommandButton and the formDois, to Search Expression which you used is not valid. The Search Expression Framework is the framework that Primefaces uses to…
-
1
votes2
answers179
viewsA: Object type for Time type data (Ex: 1 min 56 seconds) in Android/Java?
Recently I’ve been using the date4j on an android project. I also looked at Joda Time, but it seems to be very robust in terms of size and complexity to use in an Android app. But this can be…
-
1
votes1
answer171
viewsA: Error executing Startactivityforresult() line
You can’t inherit from Activity only to use the method startActivity and correlates. You can only inherit from Activity solely and exclusively to create Activity's, because most of the methods of…
-
2
votes1
answer127
viewsA: Send a List<Entity> on Redirect
The Flash Scope is often used when one wants to keep data accessible only until the next request. What is advantageous if, at the end of an action of a Managed Bean, you redirect to another page and…
-
1
votes1
answer1274
viewsA: Add buttons to the bar action when using Listactivity?
As I suggested earlier, the idea is to create a class that inherits from ActionBarActivity but which has the support methods of the class ListActivity. The class would be this: public class…
-
1
votes1
answer335
viewsA: Compare values between tags and filter them by value range in check box?
To select products that are in the price range on RadioButton selected just retrieve the text attached. Since the next element is a text type node, it is not possible to do this with jQuery, so I…
-
16
votes1
answer10356
viewsA: How to use the Toolbar widget?
To use the Toolbar, you have two options: If your application needs to support versions prior to 21 then you should use the android.support.v7.widget.Toolbar in their layouts; Otherwise just use the…
-
3
votes1
answer175
viewsA: Problem retrieving item clicked on Listactivity and return it to previous Activity
The problem is that it is recovering the value of the key "product" in the onActivityResult (CadPreVenda), and assigning to an object of the type String. Whereas in the Activity that provides that…