Featured Editorial

Introduction

With OLED screens becoming more and more common on smartphones, adapting a dark theme to your app can provide a boost to battery life.

In this tutorial, we will learn how to add a dark theme to your native Android app.

Goals

At the end of the tutorial, you …

Continue Reading
Introduction

All TextView objects have a special attribute called textAppearance. This attribute can be used to set the style for text content in a TextView without affecting other styling attributes on the same TextView object.

In this tutorial, we will learn how to apply textAppearance to TextView objects.

Goals

At …

Continue Reading

Recommended Topics

Member Avatar

Hello everyone! I am writing a program for the birthday paradox that runs trials 10,000 times. I want to show that when N people are in a room, there is a 50% chance that there will be a duplicate birthday. I want to create an empty set, then add to it random birthdays. Then I want to see if there are any duplicates, and if there are, I want to calculate the percentage of sets that have duplicates. I then want to stop the program when N people exceeds 365 or when the percentage hits 50%. However, I am not …

0
25
Member Avatar

Using: Visual Basic .NET 2012 Problem: I am using the code below to get the version information from a system dll. It returns a version number and I check the file manually by going to C:\windows\system32, right clicking, going to properties, clicking on Details and the version number that VB.NET returned to me is not the one shown here. What is up? Dim dnsFile = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\dnsapi.dll" Dim myFileVersionInfo As FileVersionInfo If File.Exists(dnsFile) Then myFileVersionInfo = FileVersionInfo.GetVersionInfo(dnsFile) FileVersion = (myFileVersionInfo.FileVersion.Split(" ")(0)).ToString End If MsgBox(FileVersion) Does anyone know why this is going on? I need to retrieve the version number …

Member Avatar
0
1,767
Member Avatar

## Introduction ## With OLED screens becoming more and more common on smartphones, adapting a dark theme to your app can provide a boost to battery life. In this tutorial, we will learn how to add a dark theme to your native Android app. ## Goals ## At the end of the tutorial, you would have learned: 1. How to modify the dark theme. 2. How to switch themes programmatically. ## Tools Required ## 1. Android Studio. *The version used in this tutorial is **Arctic Fox 2020.3.1 Patch 3**.* ## Prerequisite Knowledge ## 1. Basic Android. ## Project Setup ## …

1
24
Member Avatar

## Introduction ## All TextView objects have a special attribute called `textAppearance`. This attribute can be used to set the style for text content in a TextView without affecting other styling attributes on the same TextView object. In this tutorial, we will learn how to apply `textAppearance` to TextView objects. ## Goals ## At the end of the tutorial, you would have learned: 1. How to apply `textAppearance` to TextViews. ## Tools Required ## 1. Android Studio. *The version used in this tutorial is **Arctic Fox 2020.3.1 Patch 3**.* ## Prerequisite Knowledge ## 1. Basic Android. ## Project Setup ## …

1
30
Member Avatar

Is it necessary to have computer or laptop to test the code? Did you ever seen anyone who can be perfect or master in coding whit cell phone?

Member Avatar
3
139
Member Avatar

How would you describe c programming to a person that does not know anything about computers?

Member Avatar
1
61
Member Avatar

I am interested in technology, however I do not wish to go to university and after stumbling upon the MIT Challenge, I have taken it as a proof of concept. Clearly education is changing, and I would like to take a less traditional route. But before I go too far, I would like to set a road map, and stick to it. I am worried that the things I plan to do are not enough, or are not the right things, and so I would like some advice from those who are more experienced. I initially plan to study mathematics …

Member Avatar
0
226
Member Avatar

## Introduction ## Among all of the animation API’s on Android, MotionLayout is one of the best classes to use to create complex animations. It can animate property and motion of multiple views at the same time. Other benefits include declarative style XML and the intuitive **Motion Editor** built right into Android Studio. In this tutorial, we will learn how to move a drawable resource with MotionLayout. ## Goals ## At the end of the tutorial, you would have learned: 1. How to set up MotionLayout. 2. How to use the Motion Editor in Android Studio. ## Prerequisite Knowledge ## …

Member Avatar
1
277
Member Avatar

## Introduction ## Complex Views can use up RAM and reduce the performance of your Android apps. If a View is rarely used, you should consider delaying its rendering until it is needed by your app. One way to do that is to use the ViewStub View. ViewStub is very cheap to inflate, so it can often be used as a stub for complex Views. ## Goals ## At the end of the tutorial, you would have learned: 1. How to use ViewStub to lazily load Views. ## Prerequisite Knowledge ## 1. Basic Android development knowledge. ## Tools Required ## …

1
169
Member Avatar

Hi all. I have this code and it is correct. Dim logDayName As String = WeekdayName(Weekday(LogDateTextBox.Text)) Dim logMonthName As String = MonthName(Month(LogDateTextBox.Text)) The following code is an error on the Day function. Dim logMonthDay As Integer = Day(LogDateTextBox.Text) Please offer assistance. Thank you, Shane.

Member Avatar
0
44
Member Avatar

Good day everyone. My assignment is to create a point of sale system for a bakery shop. I have done all the coding up to the part when i have to do a 'order summary details' means i have to put all the user inputs into the order summary details. But i have no idea how do you do it. I have learnt array and managed to finish a part of it but when i try to use array for another part i cant do it and alot of errors. Im here seeking help as it is my last resort....I …

Member Avatar
0
199
Member Avatar

hi all, newbie wanna ask again... i have build gui with VB6, my gui that i designed has a big size, fullscreen when i run, so in normal mode (not running) if i want to see the form i have to scroll it, if i want to save the design to an image, full of form, how can i make it? if i use PrtSc on keyboard, it just print image on screen, not full form image, any help for me, please? thanks

Member Avatar
0
454
Member Avatar

Hello, I am trying to implement

Member Avatar
0
44
Member Avatar

I'm developing a calendar application The top level window is a frame containing a panel that displays the calendar grid and a panel that contains a "Close" button. I'm unable to obtain the size of the calendar grid panel. When I add code to get the panel size, the result is (20,20), which cannot be correct The screen size is (1920,1080) so I'm expecting something like (1920, 1000) When I add the wx.lib.inspection module, I see the correct size being displayed. It is (1920, 968) Can anyone shed some light how to get the correct size of the panel? This …

Member Avatar
0
46
Member Avatar

Hi DW. I'm trying to display a popup over an input box, but the issue is that some websites that I want to also display on have div class name that contains many classes in it which result it a div class name to have spaces in it which is not a problem. I would have used id for this but the issue is that some site doesn't have the ids. if you would take the facebook sample code: <div class="_6lux"> <div class="_6luy _55r1 _1kbt" id="passContainer"> <input type="password" class="inputtext _55r1 _6luy _9npi" name="pass" id="pass" data-testid="royal_pass" placeholder="Password" aria-label="Password" /> <div class="_9ls7" …

Member Avatar
0
168
Member Avatar

Hi DW. I'm a bit confused and lost on how this App is working called Ha Tunnel Plus (You can check it on Playstore, and have a look on YouTube for the configuration file). Basically it somehow uses the internet connection of the server, it tunnels it to your Android device and you can be connected to the internet without having data on your mobile network sim card, but you can use internet just like you would normally do except that this is not limited on how much data you as a user is using. I tried playing around with …

Member Avatar
0
259
Member Avatar

Need Help i got this assignment to create a program to insert element in array, delete element in array and view elements in array by using Menu Driven Programs plz help me

Member Avatar
0
23,380
Member Avatar

## Introduction ## If your Android app is available to a global audience, you might have wondered how to load localized **String**s into your app. This tutorial will teach you how to do just that. There are quite a few steps involved, but once you understand the concepts, it will make loading other alternate resources easier for you as well, such as **drawable**s or **font**s. Our end goal is to have the app display “*Hola Mundo!*”, which is the Spanish equivalent of “*Hello World!*” when the Android device language setting changes to Spanish. ## Goals ## At the end of …

2
44
Member Avatar

## Introduction ## One of the best debugging tools in Android Studio is the *live database inspector*. It allows developers to peek at the current state of the database and even run queries against it. In this tutorial, we will learn how to use it to debug a local SQLite database. ## Goals ## At the end of the tutorial, you would have learned: 1. How to create a SQLite Database. 2. How to debug a SQLite Database using the Database Inspector. ## Prerequisite Knowledge ## 1. Basic Android development knowledge. 1. Basic SQL knowledge. ## Tools Required ## 1. …

2
36
Member Avatar

hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much appriciated

Member Avatar
2
103,136
Member Avatar

hello , i wanna do something as below but the problem that names and address out of the connection query are empty how can i assign them and the send them to the page? app.get('/reports', (req, res)=>{ let sql = "SELECT DISTINCT name from users_table ;"; let names; let query = connection.query(sql,(err,results) => { if(err) throw err; names=results }); let sql2 = "SELECT DISTINCT address from users_table ;"; let addresss ; let query2 = connection.query(sql2,(err,results) => { if(err) throw err; addresss=results }); res.render('reports',{ title:'Reports ', names:names, addresss:addresss, }) });

Member Avatar
1
89
Member Avatar

Hi.please support my mobile

Member Avatar
0
119
Member Avatar

I've been having a tough time trying to figure this one out. Wrote a couple of notes on my phone and ended up with this as a result: import java.io.*; import java.util.Scanner; public class Assignment1 { //Returning if a character is a vowel or not. public static boolean isVowel(char c) { boolean bVowel = false; String temp = (c+"").toLowerCase(); c = temp.charAt(0); /* Switch is checking each char setting the variable bVowel to true or false. After that, the method returns the variable bVowel to the main method. */ switch(c) //Used to check each character within the word to determine …

Member Avatar
0
2,834
Member Avatar

Hi All I am creating a Visual Basic program for a Movie datbase, but i want to be able to play a youtube video Via the media player option. I would like the user to paste the link in from youtube into a text box, and click play and the video plays. I would like to do it, how this guy has done it http://www.youtube.com/watch?v=ABafGneA7mw , but he is using VB 2008. Is there away to do this in VB6 I am pretty new to this,so any help would be great Thanks Michael

Member Avatar
0
1,203
Member Avatar

Hi friends, I am a newbie to Assembly Language programming, I don't know whats the equivalent Assembly code for NASM compiler and moreover is there any compiler available for ubuntu so that I can run my TASM code as it is? Here is my simple code that works fine in TASM [CODE] ;sum=b1+b2+b3 .model small .stack 100h .data b1 db 100 ; b1=100, b1 is stored in 0 th offset of data segment b2 db 20 ; b2=20 b3 db 40 ; b3=40 sum db ? .code MOV ax,@data MOV ds,ax MOV ah,b1 ; ah=b1 i.e ah=100 ADD ah,b2 ; …

Member Avatar
0
928
Member Avatar

Hi. I'm new to java programming and I need help with this assignment. [quote]Giving change. Implement a program that directs a cashier how to give change. The program has two inputs: the amount due and the amount received from the customer. Compute the difference, and compute the dollars, quarters, dimes, nickels, and pennies that the customer should receive in return.[/quote] So far my code look like this. But I have no clue what to do now. [code]import java.util.*; public class Cashier { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("The amount due: "); double amountDue = …

Member Avatar
0
5,691
Member Avatar

## Introduction ## When localizing your application, `ResourceBundle` can be a great way to load Strings from different locales. The only concrete implementation of ResourceBundle is `PropertyResourceBundle`, which allows us to load static Strings from a text file. Because `.properties` is a common file extension used for ResourceBundles, creating ResourceBundle objects using this file format would be the focus of this tutorial. Property files are commonly used to load application properties for Spring Boot projects, so if you have been working with Spring Boot, then this file format should be familiar to you; the only difference to what we create …

2
70
Member Avatar

## Introduction ## Junit is a popular framework to create tests for Java applications. Although individual unit tests are mostly straightforward, integration and functional tests are a little bit more involved because they usually require multiple components working together. For that reason, understanding the life cycle of Junit tests can be greatly beneficial. In this tutorial, we will learn about the lifecycle of **Junit 5** test instances. ## Goals ## At the end of the tutorial, you would have learned: 1. Different stages of a Junit instance lifecycle. ## Prerequisite Knowledge ## 1. Basic Java. 2. Basic Junit. ## Tools …

2
62
Member Avatar

[CODE]#include <iostream> using namespace std; int main() { int a,b,c, ope; cout<<"enter a value" << endl; cin >> a; cout<<"enter b value" <<endl; cin >> b; cout<<"enter operation (+ - * / and %)"; cin>> ope; if (ope == +) { c=a+b; cout<< c; break; } if (ope == -) { c=a-b; cout<< c; break; } else if (ope == *) { c=a*b; cout<< c; break; } else if (ope == /) { c= a/b; cout<< c; break; } else if (ope == %) { c=a%b; cout<< c; } else cout<<"entered wrong input"; return 0; } [/CODE] whats wrong with …

Member Avatar
1
26,524
Member Avatar

Hi ... how can i have url seo friendly from database ?? Example: localhost/myshop/product.php? id = 95 Or: https://www.myshop.it/product.php?id=95 I have done several tests with .htccess but it doesn't work. I would like to have as follows: https://www.myshop.it/product.php/shoes-armani Or: https://www.myshop.it/shoes-armani tbl_product +-------------+----------------+-----+----------------+ | p_id |p_name | p_name_friendly| +-------------+----------------------+----------------+ | 95| Shoes Armani |shoes-armani | | 96| Bag Cartier | |bag-cartier | +-------------+----------------------+----------------!

Member Avatar
0
121

The End.