Tech Programming Ideas is one of the best places on the programming for programmers. Learn coding with Tech Programming Ideas tutorials. We are covered android programming, php, yii2 framework, javascript, mysql, vb.net etc.
CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications.
CodeIgniter is an Application Development Framework - a toolkit - for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.
Who is CodeIgniter For?
CodeIgniter is right for you if:
You want a framework with a small footprint.
You need exceptional performance.
You need broad compatibility with standard hosting accounts that run a variety of PHP versions and configurations.
You want a framework that requires nearly zero configuration.
You want a framework that does not require you to use the command line.
You want a framework that does not require you to adhere to restrictive coding rules.
You are not interested in large-scale monolithic libraries like PEAR.
You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).
Spinner in Android application is equivalent of ComboBox
Spinners provide a quick way to select one value from a set. In the default state, a spinner
shows its currently selected value. Touching the spinner displays a dropdown menu with all other
available values, from which the user can select a new one.
You can add a spinner to your layout with the spinner.
add code in onCreate method public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Spinner spnCountry = (Spinner) findViewById(R.id.spnCountry); ArrayAdapter<String> myAdapter = new ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_list_item_1,getResources().getStringArray(R.array.country_list)); myAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spnCountry.setAdapter(myAdapter); } } Video
How to set selected item of Spinner programmatically in Android
Get spinner selected items text?
This example enplane value display on button click Java code Button btnSubmit = (Button) findViewById(R.id.btnSubmit); btnSubmit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(TestActivity.this,String.valueOf(spnCountry.getSelectedItem()),Toast.LENGTH_LONG).show(); } }); Example 2
SpinnerspnCountry=(Spinner)findViewById(R.id.spnCountry);String text =spnCountry.getSelectedItem().toString();
Handle spinner click event
Spinner setOnItemSelectedListener
spnCountry.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { Toast.makeText(TestActivity.this,parent.getItemAtPosition(position) + " Selected",Toast.LENGTH_LONG).show(); } @Override public void onNothingSelected(AdapterView<?> parent) { } });
Set Key and Value in spinner
SpinnerCountry.java
package com.example.root.spinner;
/**
* Created by root on 8/6/19.
*/
public class SpinnerCountry {
Create simple application for Add or Subtract two numbers using android studio.
User Interface
Layout File
activity_add.xml Here is the XML code for the design.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.root.layouts.AddActivity">
month
ofyear
for the specifiedcalendar
.