Skip to content

Commit

Permalink
Subject:UI related changes
Browse files Browse the repository at this point in the history
Description:
  • Loading branch information
nutannivate committed Jan 2, 2014
1 parent 9755f88 commit 3b81416
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 59 deletions.
3 changes: 2 additions & 1 deletion res/layout/child_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
android:paddingRight="20dp"
android:paddingLeft="20dp"
android:layout_weight="0.5"
android:paddingBottom="14dp" />
android:layout_gravity="center"
android:paddingBottom="10dp" />

<Button
android:id="@+id/view"
Expand Down
40 changes: 30 additions & 10 deletions res/layout/contact.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView 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"
android:background="#15060b">
android:layout_height="fill_parent"
android:fillViewport="true"
android:background="#15060b" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >

<FrameLayout
android:layout_width="0dip"
Expand All @@ -19,8 +19,8 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#15060b"
android:layout_margin="10dp"
android:padding="10dp" >
android:layout_margin="8dp"
android:padding="8dp" >

<TextView
android:id="@+id/option_title"
Expand Down Expand Up @@ -115,9 +115,29 @@
android:background="#302b31"
android:textColor="#d0ad85"
android:textSize="18sp" />

<LinearLayout
android:orientation="vertical"
android:id="@+id/linear5"
android:layout_width="match_parent"
android:layout_height="3dp"
android:background="#d0ad85"/>

<TextView
android:id="@+id/contact6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="10dp"
android:background="#302b31"
android:textColor="#d0ad85"
android:textSize="18sp"
android:visibility="gone" />

</LinearLayout>

</FrameLayout>

</LinearLayout>
</LinearLayout>

</ScrollView>
2 changes: 1 addition & 1 deletion res/layout/group_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp"
android:padding="5dp"
android:background="#d0ad85" >

<TextView
Expand Down
23 changes: 11 additions & 12 deletions res/layout/home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
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"
android:background="#15060b">

<LinearLayout
Expand All @@ -25,8 +21,8 @@
android:layout_weight="1"
android:orientation="vertical"
android:background="#15060b"
android:layout_margin="10dp"
android:padding="10dp" >
android:layout_margin="8dp"
android:padding="8dp" >

<LinearLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -62,7 +58,7 @@
android:text="Introduction"
android:textStyle="bold"
android:layout_gravity="center"
android:padding="10dp"
android:padding="2dp"
android:background="#302b31"
android:textColor="#d0ad85"
android:textSize="18sp" />
Expand Down Expand Up @@ -95,8 +91,8 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#15060b"
android:layout_margin="10dp"
android:padding="10dp" >
android:layout_margin="8dp"
android:padding="8dp" >

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -109,19 +105,22 @@
android:text="Features of Oscad"
android:textStyle="bold"
android:layout_gravity="center"
android:padding="10dp"
android:padding="2dp"
android:background="#302b31"
android:textColor="#d0ad85"
android:textSize="18sp" />

<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/features"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:layout_weight="1"
android:textSize="15sp" />

</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="3dp"
Expand All @@ -133,7 +132,7 @@
android:text="Books on Oscad"
android:textStyle="bold"
android:layout_gravity="center"
android:padding="10dp"
android:padding="2dp"
android:background="#302b31"
android:textColor="#d0ad85"
android:textSize="18sp"/>
Expand Down
13 changes: 8 additions & 5 deletions res/layout/spoken_tutorial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:text="Instruction Sheets"
android:textStyle="bold"
android:layout_gravity="center"
android:padding="5dp"
android:padding="2dp"
android:background="#302b31"
android:textColor="#d0ad85"
android:textSize="18sp" />
Expand All @@ -54,7 +54,8 @@
android:paddingTop="10dp"
android:paddingRight="20dp"
android:paddingLeft="20dp"
android:paddingBottom="12dp"
android:paddingBottom="10dp"
android:layout_gravity="center_vertical"
android:text="Oscad Installation Instructions for Windows"
android:layout_weight="0.5" />

Expand All @@ -81,7 +82,8 @@
android:paddingTop="10dp"
android:paddingRight="20dp"
android:paddingLeft="20dp"
android:paddingBottom="12dp"
android:paddingBottom="10dp"
android:layout_gravity="center_vertical"
android:text="Oscad Installation Sheet for Linux"
android:layout_weight="0.5" />

Expand All @@ -108,7 +110,8 @@
android:paddingRight="20dp"
android:paddingLeft="20dp"
android:layout_weight="0.5"
android:paddingBottom="14dp"
android:paddingBottom="10dp"
android:layout_gravity="center_vertical"
android:text="Oscad Installation Sheet for Windows" />

<Button
Expand Down Expand Up @@ -136,7 +139,7 @@
android:text="Spoken Tutorials"
android:textStyle="bold"
android:layout_gravity="center"
android:padding="5dp"
android:padding="2dp"
android:background="#302b31"
android:textColor="#d0ad85"
android:textSize="18sp" />
Expand Down
30 changes: 17 additions & 13 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
<string name="title_section4">Contact us</string>
<string name="title_section5">FAQs</string>
<string name="title_section6">Weblinks</string>
<string name="title_section7">Login</string>
<string name="title_section8">Textbook companion</string>
<string name="title_section9">Lab migration</string>
<string name="title_section10">Workshops</string>
<string name="title_section7">Textbook companion</string>
<string name="title_section8">Lab migration</string>
<string name="title_section9">Workshops</string>

<string name="intro">
<p style="text-align: justify; margin-top: 10px; margin-bottom: 5px; margin-left: 20px;"><b>Oscad</b> is an open source EDA tool for circuit design, simulation, analysis and PCB design. It is an integrated tool built using open source software such as KiCad (<a href="http://www.kicad-pcb.org" title="http://www.kicad-pcb.org">http://www.kicad-pcb.org</a>), Ngspice (<a href="http://ngspice.sourceforge.net/" title="http://ngspice.sourceforge.net/">http://ngspice.sourceforge.net</a>) and Scilab (<a href="http://www.scilab.org/" title="http://www.scilab.org/">http://www.scilab.org</a>). Oscad is released under GPL.</p>
Expand Down Expand Up @@ -114,15 +113,17 @@
<string name="text_book4">
1. You should know or learn Oscad. Resources are provided at Oscad Resources. Learning Oscad is easy and
if someone listens to and practices the Spoken Tutorials on Oscad, it can be learned in 2-3 days. For use of
any software package other than Oscad, contact us at [email protected] &lt;br /&gt;&lt;br /&gt;
any software package other than Oscad, contact us at
<![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]> &lt;br /&gt;&lt;br /&gt;

2. You should propose three books in the order of your preference, using the proposal
form available here. You have to create a new account and log in to access the proposal form.
You must ensure that the books you are proposing have not been been completed or undertaken under this project.
Click on Completed Books and Books in Progress to see the respective lists.&lt;br /&gt;

We will try to allot one of the three proposed books to you. Along with the book proposal, you are required to send a
typical chapter\'s solved examples project file using Oscad from one of the three proposed books to [email protected] in a .zip or
typical chapter\'s solved examples project file using Oscad from one of the three proposed books to
<![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]> in a .zip or
.tgz file. We will not contact you to send the code. &lt;br /&gt;

It is suggested that you propose the book as early as possible,
Expand Down Expand Up @@ -157,8 +158,11 @@
2. Project name should be same as the example number.(e.g example_2.3) &lt;br /&gt;&lt;br /&gt;
3. Give the respective names and values to the elements as given in the book. &lt;br /&gt;&lt;br /&gt;
4. Put the plot option at the inputs and outputs. &lt;br /&gt;&lt;br /&gt;
5. Use the proper model of the devices as mentioned in the book, if you are unable to find models of device then contact us at [email protected]. &lt;br /&gt;&lt;br /&gt;
6. Once you have completed the project, mail us at [email protected] with complete details including your name and allotted book. &lt;br /&gt;
5. Use the proper model of the devices as mentioned in the book, if you are unable to find models of device then contact us at
<![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]>. &lt;br /&gt;&lt;br /&gt;
6. Once you have completed the project, mail us at
<![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]>
with complete details including your name and allotted book. &lt;br /&gt;
</string>

<string name="Honorarium">
Expand Down Expand Up @@ -221,7 +225,7 @@
</string>
<string name="lab_migration3">
Learn how to submit a proposal here ­ <![CDATA[<a href="http://oscad.in/lab_migration/proposal">http://oscad.in/lab_migration/proposal</a>]]>. &lt;br /&gt;&lt;br /&gt;
We can also be reached directly at [email protected].&lt;br /&gt;
We can also be reached directly at <![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]>.&lt;br /&gt;
</string>
<string name="lab_migration4">
Teachers/Professors/Students from educational institutions across the country can participate in the Lab Migration project.
Expand Down Expand Up @@ -339,7 +343,7 @@
<item>The teacher is expected to guide the intern during the internship and will bear
the responsibility for the student\'s submissions and undertakings.</item>
<item>Yes. It is necessary to have a mentor. However, if you are do not have a mentor
in such cases, please inform us by e-mail [email protected].
in such cases, please inform us by e-mail <![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]>.
Please note: in case you do not have a mentor, the remuneration meant for
the mentor will not be paid to the intern.</item>
<item>Although it isn’t necessary to inform the HOD, the teacher is advised to do so.
Expand Down Expand Up @@ -383,14 +387,14 @@
activity are available for free downloading.
The solved examples can be referred if needed.</item>
<item>We encourage you to use Oscad. For use of any other open source software
package, contact us at [email protected].</item>
package, contact us at <![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]>.</item>
<item>It takes three days to get a temporary allotment from the day you submit
your book proposal. Further, it may take another ten days from the day you
submit the temporary allotment code, to get the final allotment.
Please contact us only if you haven\'t heard from us in ten days.</item>
<item>The simulation exercises can be started as soon as the book proposed by you is approved
and book allotment is confirmed. The confirmation will be communicated via an automated e­mail.</item>
<item>Please contact the Oscad team at [email protected]
<item>Please contact the Oscad team at <![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]>
and let them know that your solutions are completed.
</item>
</string-array>
Expand Down Expand Up @@ -451,7 +455,7 @@
<item>You can buy a one rupee revenue stamp from the Post Office.
Here is a scan of a fully filled internship form
­http://oscad.in/files/download/forms/example­filled­receipt.pdf</item>
<item>You can contact the Oscad team at [email protected].</item>
<item>You can contact the Oscad team at <![CDATA[<a href=\'mailto:[email protected]\'>[email protected]</a>]]>.</item>

</string-array>
</resources>
34 changes: 17 additions & 17 deletions src/iitb/oscad/in/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ public void onPageSelected(int position) {
}
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
// @Override
// public boolean onCreateOptionsMenu(Menu menu) {
// // Inflate the menu; this adds items to the action bar if it is present.
// getMenuInflater().inflate(R.menu.main, menu);
// return true;
// }

@Override
public void onTabSelected(ActionBar.Tab tab,
Expand Down Expand Up @@ -155,7 +155,7 @@ public Fragment getItem(int position) {
@Override
public int getCount() {
// Show 3 total pages.
return 10;
return 9;
}

@Override
Expand All @@ -180,8 +180,6 @@ public CharSequence getPageTitle(int position) {
return getString(R.string.title_section8).toUpperCase(l);
case 8:
return getString(R.string.title_section9).toUpperCase(l);
case 9:
return getString(R.string.title_section10).toUpperCase(l);
}
return null;
}
Expand Down Expand Up @@ -362,11 +360,13 @@ public void onClick(View arg0) {
"Lab migration : <a href='mailto:[email protected]'>[email protected]</a>",
"SELF workshops : <a href='mailto:[email protected]'>[email protected]</a>",
"Oscad development and enhancing its capabilities : <a href='mailto:[email protected]'>[email protected]</a>",
"Feedback on Oscad book : <a href='mailto:[email protected]'>[email protected]</a>"};
int[] ids = new int[]{R.id.contact1,R.id.contact2,R.id.contact3,R.id.contact4,R.id.contact5};
"Feedback on Oscad book : <a href='mailto:[email protected]'>[email protected]</a>",
"General Queries : <a href='mailto:[email protected]'>[email protected]</a>"};
int[] ids = new int[]{R.id.contact1,R.id.contact2,R.id.contact3,R.id.contact4,R.id.contact5,R.id.contact6};

for (int i = 0; i < contact_to.length; i++) {
TextView contentTextView = (TextView) rootView.findViewById(ids[i]);
contentTextView.setVisibility(View.VISIBLE);
contentTextView.setMovementMethod(LinkMovementMethod.getInstance());
contentTextView.setText(Html.fromHtml(contact_to[i]));
}
Expand Down Expand Up @@ -413,11 +413,8 @@ public void onClick(View arg0) {
contentTextView.setText(sContact);
}
break;

case 7:

break;

case 8:
rootView = inflater.inflate(R.layout.list,container, false);

String[] from = new String[] {"names_"};
Expand Down Expand Up @@ -500,7 +497,7 @@ public void onClick(View v) {
}
});
break;
case 9:
case 8:
//lab migration project
rootView = inflater.inflate(R.layout.list,container, false);

Expand All @@ -525,6 +522,9 @@ public void onClick(View v) {
final ListView lv1 = (ListView) rootView.findViewById( R.id.listView1 );
lv1.setAdapter(adapter1);

TextView tvname = (TextView)rootView.findViewById(R.id.textView5);
tvname.setText("Lab Migration");

lv1.setOnItemClickListener(new OnItemClickListener() {

@Override
Expand All @@ -536,7 +536,7 @@ public void onItemClick(AdapterView a, View v, int position, long id) {
}
});
break;
case 10:
case 9:
rootView = inflater.inflate(R.layout.list,container, false);

String[] from_names = new String[] {"names_"};
Expand Down

0 comments on commit 3b81416

Please sign in to comment.