Questions tagged [programmatically-created]

Any object in an application created using a computer program rather than created manually using something in the userspace.

General Definition

Any object in an application created using a computer program rather than created manually using something in the userspace.

GUI Elements

In general, elements are declared in inside their accompanying tags in / files or in any other derivatives ( , , , , , and many others).

Programmatically created are those elements that are coded in contexts that need to be compiled to take effect at . They could be created at by a click of a as an example, where they would be coded inside a click listener for that .

438 questions
3
votes
4 answers

add tap gesture to a UILabel Programmatically

I am trying to add tap gesture for a dynamically created UILabel in a function in swift 4, but it is not firing UITapGestureRecognizer function. it is working when i add tap gesture from viewDidLoad function, but i have to add tap gesture from other…
3
votes
0 answers

How to set textview position when created dynamically in Android Studio

I want to dynamically change the position of the textview list dynamically. Here's what I have tried so far: final TextView[] myTextViews = new TextView[N]; // create an empty array; TextView rowTextView = new TextView(Oyun.this); rowTextView =…
3
votes
2 answers

Programmatically constructing a Common Lisp function with defun

I would like to define a function using defun, but not at top level. (The function name & body needs to be constructed from some user input.) The following illustrates the basic objective: (let ((name 'fn1) (body "abc")) (eval `(defun ,name…
3
votes
2 answers

iOS: Create Label Programmatically with Word Wrap

I am wanting to create a label programmatically that is able to word wrap for long sentences. Here is the loop I have for creating the labels: for i in 0..
user1715916
  • 333
  • 5
  • 13
3
votes
1 answer

How to add NSLayoutConstraints Programmatically

I want to add a button as subview of root view. Button must be place horizontally at centre as well as vertically at centre of superview. I'm using NSLayoutConstraints programatically. This is my code. class ViewController: UIViewController { …
Vikas
  • 666
  • 5
  • 15
3
votes
3 answers

How to programmatically create binary columns based on a categorical variable in data.table?

I have a big (12 million rows) data.table which looks like this: library(data.table) set.seed(123) dt <- data.table(id=rep(1:3, each=5),y=sample(letters[1:5],15,replace = T)) > dt id y 1: 1 b 2: 1 d 3: 1 c 4: 1 e 5: 1 e 6: 2 a 7: 2…
hellter
  • 944
  • 14
  • 31
3
votes
2 answers

Programmatic imageview and picasso

I'm fairly new to Android development but I have the following problem. I am trying to create several ImageViews programmatically and use Picasso to load the image and I stumbled on the following problem. EDIT: What I am trying to achieve is I want…
Ioannis I
  • 298
  • 3
  • 15
3
votes
0 answers

Quantifying Battery Drain in Android

Currently, I am trying to quantify amount of battery (in percentage or mAh) drain by my App in background vs foreground mode. From: How can we calculate/ to know, how much battery life my user defined application utilising? It looks like, we need to…
ssk
  • 9,045
  • 26
  • 96
  • 169
3
votes
1 answer

submit form data programmatically android (data lost)

I am making an app for myself to see when classes to my university (that are full) become available. I need my app to be able to programmatically enter information into a 'class search' form and press the submit button so that I can check if any…
3
votes
4 answers

How do I programmatically call authenticate from within a servlet like j_security_check would do

We have the web based form login authentication with j_securtiy_check working. We'd like to change it by programmatic login authentication. What is the proper way of having a servlet authenticate a user name and password passed to it? The servlet is…
3
votes
1 answer

Getting exception while setting layoutparams of scrollview programmatically

I am getting exception while setting the layoutparams of scroolview programmatically.I have tried but getting exception while doing that.This is the code: sv = (ScrollView)findViewById(R.id.scrollView); …
user1662334
  • 659
  • 2
  • 9
  • 21
2
votes
1 answer

XCode: Add multiple buttons programmatically with specific names and animate

I just read this post about adding buttons with a loop programmatically. I want to do the same thing, but do it with a name for each one, and animate them the same way. Is this a good idea, or should I just copy the same line of code for each…
Kevin Brown
  • 12,602
  • 34
  • 95
  • 155
2
votes
1 answer

WPF add Interaction Trigger programmatically in the DataTemplate

I would like to add an interaction trigger as in the xaml example below:
Yannick
  • 194
  • 8
2
votes
1 answer

How can I programmatically seamlessly share a clients google calendar with a service account as automatically as possible

I am trying to share a service account with any user's calendar and would like to know if anyone knows how to do so on the backend which is node.js or the frontend which is flutter/dart so that the user has to do as little as possible to add the…
2
votes
1 answer

dotnet ef scaffold Unrecognized option '-t firstTable -t secondTable' - pass arguments stored in a string

I have a .ps1 file that I run from PowerShell, the code is as follows: $strTables = "" $tables | ForEach-Object{ $strTables += "-t $_ " } # $strTables = -t fisrtTable -t secondTable dotnet ef dbcontext scaffold $strConn…