Posts by itscorey • 2,686 points
80 posts
-
0
votes2
answers160
viewsA: How do I resolve the distortion that occurs when I switch from Portrait to Landscape?
There are two possible answers to your question. The first, and to which anyone would answer, is that the @Ramaral quoted. In quotation to his comment, I will summarize it as a response. You will…
-
0
votes1
answer67
viewsA: Error: Cannot find Symbol getRootElement
Since you didn’t explain exactly what’s going on with the code, I took the same approach as you, but I used standard JDK methods, I didn’t use SAX. And this approach seemed simpler to me. Feel free…
-
9
votes2
answers1625
viewsQ: When and why should we use SVG?
I’ve been developing for Android for a long time, I program natively, to be more specific. But lately I have had some doubts with the use of images in the application. One time or another we will…
-
1
votes2
answers86
viewsA: Need for Sqlite
IS relative, because it depends on how you want your app to work. A few months ago, I made an app that showed city events receiving data by JSON, I didn’t use a database because I didn’t need to…
-
3
votes2
answers1229
viewsA: How to make the actionBar back button work?
Use the method setNavigationIcon to add the icon in the Toolbar and setNavigationOnClickListener to perform an action by clicking on the icon. Method with support to Java 8 qualified…
-
1
votes1
answer122
viewsA: Positioning Imagebutton in XML
This is the configuration necessary for your ImageButton align according to the start and end of the screen. Check that there is no alignment with the Parent, which in this case is the…
-
9
votes6
answers18836
viewsA: Removing Titlebar from the android app
You can configure by Manifest to leave the app on fullscreen. Androidmanifest.xml <application android:allowBackup="true" android:icon="@mipmap/logo" android:label="@string/app_name"…
-
4
votes2
answers3204
viewsA: Implement Numeric Keyboard
Just configure the input type of your Edittext in the XML file. <EditText android:inputType="number"/> Or if you prefer, you can do this by Java itself:…
-
2
votes3
answers1828
viewsA: Format Strings to RG
An alternative to the @Maniero response is to use Insert. using System; public class Program { public static void Main() { Console.WriteLine(mask("12345678x")); } public static string mask(string…
-
0
votes1
answer343
viewsA: Error sending an int parameter through an Intent
I believe you’re making a mistake when you’re trying to pass values. Check the code below. Send license code startActivity(new Intent(getApplicationContext(), Telagerador.class) // Acredito que…
-
1
votes1
answer269
viewsA: Accessing Wifi settings from android (IPV4)
To receive a IP patterned IPV4, use the following code: public static String getIPV4 (){ try { for (Enumeration enumeration = NetworkInterface.getNetworkInterfaces();…
-
2
votes3
answers1464
viewsA: How to control volume to app media on Android
You can use the Audiomanager. Example of use: AudioManager audio = (AudioManager) getApplicationContext().getSystemService(Context.AUDIO_SERVICE); audio.setStreamVolume(AudioManager.STREAM_MUSIC,…
-
0
votes2
answers127
viewsA: Click button performs an action second click on the same button performs different action
Yes, it is possible. public class MyClass extends Activity { /** * @Variável: hasClicked * @Tipo: booleana * @Descrição: Para verificarmos se algum toque foi feito no botão, poderemos usar uma…
-
2
votes1
answer1478
viewsA: error while trying to generate android apk
Failed to read key from keystore There are several possibilities for this error to appear. See possible below: When entering the password on menu to generate the APK, you may have mistaken the…
-
1
votes3
answers468
viewsA: How to pass arguments for running an android app?
You can do it with SharedPreferences. With this, you can create a preferences screen or settings for your application. You will be able to load the preference at any point of application execution.…
-
1
votes3
answers2212
views -
7
votes2
answers2490
viewsA: Phonegap x native application
Development with: Phonegap The PhoneGap is a framework for the development of applications hybrid, using the latest technology from web. Well known for webDevelopers, who are: HTML5, CSS3 and…
-
1
votes1
answer1035
viewsA: Doubt with style files (Styles.xml) on Android
I believe that if all their styles derive from AppCompat you can use a standard attribute to be used in all styles. Below I show you a very simple example. strings.xml (API: 21) <resources>…
android-layoutanswered itscorey 2,686 -
7
votes2
answers1106
viewsA: How to open an Activity from a java notification on android?
PendingIntent.getActivity(context, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); The above code makes use of the flag UPDATE_CURRENT which updates instead of opening a new Activity, it…
-
1
votes1
answer505
views -
1
votes2
answers130
viewsA: Video view overlaying another Video View on Tabactivity Android
When tabs Homem or Mulher are created, it is good to check if the other video not belonging to it is running, if yes, pause it and leave invisible. Woman Activity @Override protected void onCreate…
-
6
votes1
answer2629
viewsA: Android Studio with Mainactivity Problem
To solve this, do it: Clean project located in Build Rebuild project located in Build, after the end of the Clean Project. Remember that the class R is created automatically after the Build of your…
-
1
votes2
answers1027
viewsA: Stream video mms or rtsp:// on android
Ffmpegmediaplayer Free translation of the library main page: Ffmpegmediaplayer, is a reimplementation of the Mediaplayer class of Android. The library gives you the opportunity to use a unified…
-
3
votes1
answer15733
viewsA: How to change the name in the android app package?
Well, beforehand, I just wanted to tell you that class R is always created after Build. So if you have changed the package of your project, remember to give a clean project and then a build project.…
-
0
votes1
answer474
viewsA: Android Studio does not save project changes
how to restore Android Studio settings? If you’ve done it, but it didn’t work, update your Android Studio. The current version of Android Studio is the 1.1 that was released a little while ago. If…
-
0
votes3
answers464
viewsA: adb error: The Connection to adb is down, and a Severe error has occurred
Task manager Close process: ADB.exe Close process: Eclipse.exe Open the eclipse again.…
-
6
votes1
answer4720
viewsA: How do I put a CSS box-shadow-like effect on an Android layout?
This type of effect is well used in Material Design. It is based on the CardView and/or RecyclerView. Below I will show how easy it is to make this kind of effect. drawable/layout_shadow_white.xml…
-
2
votes3
answers12679
viewsA: How to change the color of the boot via code on android?
Use: seuButton.setBackgroundResource(R.drawable.my_button_style); With this method, you will assign to Background from the button, a Shape coming XML with your desired color/style. But with this…
-
1
votes1
answer94
viewsA: How to make three buttons work as radio button?
I’ll give you a simple example of use. Remember that the code below is just a demo. public class Main extends Activity { @Override protected void onCreate(Bundle cicle) { super.onCreate(cicle);…
-
5
votes1
answer1919
viewsA: Perform an action only when the app starts for the first time after installation
You have two options: check if the application has been licensed and do not show the message, or use Sharedpreferences. Option 1: let’s say that you are using a database to enter the license for the…