Skip to content

Commit

Permalink
Subject:After rollover frized create account page
Browse files Browse the repository at this point in the history
Description:
1) hide create account tab and show list of accounts
  • Loading branch information
ashwinishinde committed Jan 15, 2014
1 parent 6266137 commit f76ab23
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 230 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:icon="@drawable/abt_logo"
android:label="@string/app_name" >
Expand Down
45 changes: 36 additions & 9 deletions src/com/example/gkaakash/account_tab.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.example.gkaakash;

import java.util.ArrayList;
import java.util.List;

import com.gkaakash.controller.Preferences;
import com.gkaakash.controller.Report;
import com.gkaakash.controller.Startup;

import android.app.Activity;
Expand Down Expand Up @@ -47,20 +49,45 @@ public void onCreate(Bundle savedInstanceState) {
tabHost.setup(manager);
TabHost.TabSpec spec;
Intent intent;

intent = new Intent(account_tab.this, createAccount.class);
spec = tabHost.newTabSpec("Create Account").setIndicator("Create Account").setContent(intent);
tabHost.addTab(spec);

intent = new Intent(account_tab.this, edit_account.class);
spec = tabHost.newTabSpec("Edit Account").setIndicator("Edit Account").setContent(intent);
tabHost.addTab(spec);
// String getOrgName = menu.OrgName;
// String financialFrom = menu.financialFromDate;
// String financialTo = menu.financialToDate;
//ArrayList<String> detailsList_foredit=menu.accdetailsList;
//System.out.println("cuming from menu page:"+detailsList_foredit);
Report report = new Report(IPaddr);
//String orgtype=detailsList_foredit.get(1);
String orgtype = menu.orgtype;

//Object[] rollover_exist_params = new Object[] {getOrgName,financialFrom,financialTo};
Boolean existRollOver = menu.existRollOver;

if(existRollOver.equals(false)){
intent = new Intent(account_tab.this, createAccount.class);
spec = tabHost.newTabSpec("Create Account").setIndicator("Create Account").setContent(intent);
tabHost.addTab(spec);
intent = new Intent(account_tab.this, edit_account.class);
intent.putExtra("rollover", "not_exist");
spec = tabHost.newTabSpec("Edit Account").setIndicator("Edit Account").setContent(intent);
tabHost.addTab(spec);
}
else
{
intent = new Intent(account_tab.this, edit_account.class);
intent.putExtra("rollover", "exist");
spec = tabHost.newTabSpec("List of Account ").setIndicator("List of Account").setContent(intent);
tabHost.addTab(spec);
}
if(existRollOver.equals(false)){
//change the tab text color
TextView tv = (TextView) tabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.title);
tv.setTextColor(Color.WHITE);
tv = (TextView) tabHost.getTabWidget().getChildAt(1).findViewById(android.R.id.title);
tv.setTextColor(Color.WHITE);
}
else{
TextView tv = (TextView) tabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.title);
tv.setTextColor(Color.WHITE);
}

tabHost.setOnTabChangedListener(new OnTabChangeListener() {

Expand All @@ -72,4 +99,4 @@ public void onTabChanged(String tabId) {
}
});
}
}
}
Loading

0 comments on commit f76ab23

Please sign in to comment.