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.
user interface is displayed through an activity(Screen). Activity is used to represent the data to user and allows user interaction. In an android application, we can have multiple activities and they can interact with each other Interaction between multiple activities can be done only using Intent. Intents are objects of theandroid.content.Intent type. Your code can send them to the Android system defining the components you are targeting. In Android app development you face situations where you want to send or receive your data between one Activity (Screen) to another.
Intent i =newIntent(getApplicationContext(),NewActivity.class);
i.putExtra("key","value");
startActivity(i);
Then in the new Activity, retrieve those values:
Bundle extras = getIntent().getExtras();if(extras !=null){String value = extras.getString("key");//The key argument here must match that used in the other activity}
Use this technique to pass variables from one Activity to the other.
public class Genfunctions {
public void menuActions(String title,Context ct){
//this.context=context;
switch (title){
case "ENTRIES":
Intent intent = new Intent(ct, RptentrylistActivity.class);
ct.startActivity(intent);
break;
}
}//end of functions
}
Activity Class function call like this
Genfunctions gn = new Genfunctions();
gn.menuActions("ENTRIES",this);
The SQLite MAX function is an aggregate function that returns the maximum value of all values in a group.
public int getMaxid(){ String selectQuery = "SELECT max(id) as id FROM customerentries"; SQLiteDatabase database = this.getWritableDatabase(); Cursor cursor = database.rawQuery(selectQuery, null); cursor.moveToFirst(); int maxid = cursor.getInt(cursor.getColumnIndex("id")); return maxid; }
Solution for -
How to find the maximum value of the column in sqlite database
How to hide a particular column in Android TableRow
Try to Use setVisibility(View.GONE);
t3v.setVisibility(View.GONE);
TextView id = new TextView(EntriesActivity.this);
id.setText(content.get("id").toString());
id.setTextColor(Color.WHITE);
id.setVisibility(View.GONE);
row.addView(id);
Get total RowCount for TableLayout in Android
Through this code you can get the total rowCount for TableLayout