add misc drawables

update layouts
This commit is contained in:
Andrew Dolgov 2011-11-23 23:18:18 +03:00
parent 212031e3cf
commit c18ed97aa4
14 changed files with 203 additions and 22 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

77
res/drawable/mark_set.svg Normal file
View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16.000000px"
height="16.000000px"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.48.1 "
sodipodi:docname="mark_set.svg"
inkscape:export-filename="mark_set.png"
inkscape:export-xdpi="302.63"
inkscape:export-ydpi="302.63"
version="1.1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0000000"
inkscape:pageshadow="2"
inkscape:zoom="31.678384"
inkscape:cx="6.9004349"
inkscape:cy="7.415554"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1600"
inkscape:window-height="1131"
inkscape:window-x="0"
inkscape:window-y="25"
showguides="true"
inkscape:guide-bbox="true"
showgrid="false"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:type="star"
style="opacity:1.0000000;fill:#a8cdfd;fill-opacity:1.0000000;stroke:#4f9dfd;stroke-width:0.99999938;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path1306"
sodipodi:sides="5"
sodipodi:cx="7.3551731"
sodipodi:cy="1.6684607"
sodipodi:r1="6.3745561"
sodipodi:r2="3.1872780"
sodipodi:arg1="0.78539816"
sodipodi:arg2="1.4137167"
inkscape:flatsided="false"
inkscape:rounded="0.0000000"
inkscape:randomized="0.0000000"
d="M 11.862665,6.1759525 L 7.8537732,4.8164981 L 4.4611852,7.3482318 L 4.5152876,3.1154547 L 1.0590984,0.67126048 L 5.1014272,-0.58528520 L 6.3579728,-4.6276140 L 8.8021671,-1.1714248 L 13.034944,-1.2255272 L 10.503210,2.1670609 L 11.862665,6.1759525 z "
transform="matrix(-0.707107,-0.707107,0.707107,-0.707107,12.02111,14.98939)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16.000000px"
height="16.000000px"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.48.1 "
sodipodi:docname="mark_unset.svg"
inkscape:export-filename="mark_unset.png"
inkscape:export-xdpi="302.63"
inkscape:export-ydpi="302.63"
version="1.1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0000000"
inkscape:pageshadow="2"
inkscape:zoom="31.678384"
inkscape:cx="1.9759413"
inkscape:cy="7.415554"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1600"
inkscape:window-height="1131"
inkscape:window-x="0"
inkscape:window-y="25"
showguides="true"
inkscape:guide-bbox="true"
showgrid="false"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:type="star"
style="opacity:1;fill:#ffffff;fill-opacity:0;stroke:#cce4ff;stroke-width:0.99999938000000022;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path1306"
sodipodi:sides="5"
sodipodi:cx="7.3551731"
sodipodi:cy="1.6684607"
sodipodi:r1="6.3745561"
sodipodi:r2="3.1872780"
sodipodi:arg1="0.78539816"
sodipodi:arg2="1.4137167"
inkscape:flatsided="false"
inkscape:rounded="0.0000000"
inkscape:randomized="0.0000000"
d="M 11.862665,6.1759525 L 7.8537732,4.8164981 L 4.4611852,7.3482318 L 4.5152876,3.1154547 L 1.0590984,0.67126048 L 5.1014272,-0.58528520 L 6.3579728,-4.6276140 L 8.8021671,-1.1714248 L 13.034944,-1.2255272 L 10.503210,2.1670609 L 11.862665,6.1759525 z "
transform="matrix(-0.707107,-0.707107,0.707107,-0.707107,12.02111,14.98939)"
inkscape:export-xdpi="302.63"
inkscape:export-ydpi="302.63" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -1,8 +1,16 @@
<LinearLayout android:id="@+id/article_fragment" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical">
<LinearLayout android:layout_gravity="center_vertical" android:padding="3dip" android:background="#e0e0e0" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:id="@+id/article_header">
<TextView android:singleLine="true" android:layout_weight="1" android:text="TextView" android:layout_height="wrap_content" android:textColor="#909090" android:ellipsize="end" android:layout_width="match_parent" android:id="@+id/title"></TextView>
<Button android:text="Close" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/close_button"></Button>
<LinearLayout android:id="@+id/article_fragment" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal">
<ImageView android:layout_weight="0" android:background="?articleDivider" android:layout_width="wrap_content" android:paddingLeft="2dip" android:layout_height="match_parent"></ImageView>
<LinearLayout
android:id="@+id/linerLayout2"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent" android:orientation="vertical">
<LinearLayout android:background="?articleHeader" android:layout_gravity="center_vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:id="@+id/article_header" android:padding="10dip">
<TextView android:singleLine="true" android:layout_weight="1" android:text="TextView" android:layout_height="wrap_content" android:ellipsize="end" android:layout_width="match_parent" android:id="@+id/title" android:textSize="15dip"></TextView>
<Button android:text="Close" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/close_button"></Button>
</LinearLayout>
<ImageView android:background="?articleDivider" android:paddingTop="2dip" android:layout_weight="0" android:layout_height="wrap_content" android:layout_width="match_parent"></ImageView>
<WebView android:layout_weight="0" android:layout_width="match_parent" android:padding="3dip" android:layout_height="match_parent" android:id="@+id/content"></WebView>
</LinearLayout>
<WebView android:padding="3dip" android:layout_width="match_parent" android:id="@+id/content" android:layout_height="match_parent"></WebView>
</LinearLayout>

View File

@ -6,6 +6,6 @@
<ProgressBar android:layout_width="wrap_content" style="?android:attr/progressBarStyleLarge" android:id="@+id/loading_progress" android:layout_height="wrap_content"></ProgressBar>
<TextView android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/loading_message" android:layout_height="wrap_content" ></TextView>
</LinearLayout>
<ListView android:id="@+id/feeds" android:layout_height="match_parent" android:layout_width="match_parent"></ListView>
<ListView android:divider="#00000000" android:id="@+id/feeds" android:layout_height="match_parent" android:layout_width="match_parent"></ListView>
</FrameLayout>

View File

@ -3,24 +3,23 @@
android:layout_height="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:gravity="center_vertical"
android:padding="3dip" android:id="@+id/feeds_row" android:layout_width="match_parent">
android:id="@+id/feeds_row" android:layout_width="match_parent" android:paddingBottom="4dip" android:paddingLeft="8dip" android:paddingRight="8dip" android:paddingTop="4dip">
<TextView
android:id="@+id/title"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:paddingLeft="6dip"
android:text="{FEED}" android:textSize="16sp" android:layout_width="wrap_content"/>
android:text="{FEED}" android:layout_width="wrap_content" android:textSize="21dp"/>
<TextView
android:id="@+id/unread_counter"
android:gravity="right"
android:textSize="12sp"
android:textStyle="bold"
android:paddingRight="6dip"
android:textColor="?unreadCounterColor"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="{123}"/>
android:text="{123}" android:textSize="16dp"/>
</LinearLayout>

View File

@ -3,7 +3,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/headlines_fragment">
<ListView android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/headlines" android:background="#fafafa"></ListView>
<ListView android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/headlines" android:background="?headlinesBackground"></ListView>
<LinearLayout android:id="@+id/loading_container" android:gravity="center" android:layout_height="match_parent" android:layout_width="match_parent">
<ProgressBar android:layout_width="wrap_content" style="?android:attr/progressBarStyleLarge" android:id="@+id/loading_progress" android:layout_height="wrap_content"></ProgressBar>
<TextView android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/loading_message" android:layout_height="wrap_content" ></TextView>

View File

@ -4,7 +4,8 @@
android:gravity="center_vertical"
android:padding="3dip" android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
<CheckBox android:focusable="false"
android:paddingLeft="6dip" android:paddingRight="6dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/selected"></CheckBox>
android:paddingLeft="6dip" android:paddingRight="6dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/selected"></CheckBox>
<ImageView android:layout_width="wrap_content" android:id="@+id/imageView1" android:layout_height="wrap_content" android:src="@android:drawable/star_off" android:paddingRight="5dip" android:clickable="true"></ImageView>
<LinearLayout android:layout_weight="1" android:layout_height="wrap_content" android:id="@+id/linearLayout1" android:orientation="vertical" android:layout_width="match_parent">
<TextView android:id="@+id/title" android:textSize="16sp" android:text="{Title...}" android:layout_width="match_parent" android:layout_height="match_parent"></TextView>

View File

@ -1,16 +1,17 @@
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/main_flipper">
<FrameLayout android:layout_height="match_parent" android:id="@+id/sync_splash" android:layout_width="match_parent" android:layout_gravity="center_vertical">
<LinearLayout android:layout_height="match_parent" android:id="@+id/linearLayout1" android:gravity="center" android:layout_width="match_parent">
<ProgressBar style="?android:attr/progressBarStyleLarge" android:id="@+id/loading_progress" android:layout_height="wrap_content" android:layout_width="wrap_content"></ProgressBar>
<TextView android:id="@+id/loading_message" android:text="@string/loading_message" android:layout_height="wrap_content" android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge"></TextView>
<FrameLayout android:id="@+id/sync_splash" android:layout_height="match_parent" android:layout_gravity="center_vertical" android:layout_width="match_parent">
<LinearLayout android:gravity="center" android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="match_parent">
<ProgressBar android:layout_width="wrap_content" style="?android:attr/progressBarStyleLarge" android:layout_height="wrap_content" android:id="@+id/loading_progress"></ProgressBar>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/loading_message" android:text="@string/loading_message"></TextView>
</LinearLayout>
</FrameLayout>
<LinearLayout android:layout_height="fill_parent" android:id="@+id/main" android:layout_width="fill_parent" android:orientation="horizontal">
<LinearLayout android:id="@+id/feeds_fragment" android:layout_weight="0" android:layout_height="match_parent" android:orientation="vertical" android:layout_width="300dp"></LinearLayout>
<LinearLayout android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/headlines_fragment" android:orientation="vertical" android:layout_width="match_parent"></LinearLayout>
<LinearLayout android:id="@+id/article_fragment" android:layout_weight="0" android:layout_height="match_parent" android:orientation="vertical" android:layout_width="500dp"></LinearLayout>
<LinearLayout android:id="@+id/feeds_fragment" android:layout_weight="0.6" android:layout_height="match_parent" android:orientation="vertical" android:layout_width="match_parent"></LinearLayout>
<LinearLayout android:layout_height="match_parent" android:layout_weight="0.5" android:id="@+id/headlines_fragment" android:orientation="vertical" android:layout_width="match_parent"></LinearLayout>
<LinearLayout android:id="@+id/article_fragment" android:layout_weight="0.5" android:layout_height="match_parent" android:orientation="vertical" android:layout_width="match_parent"></LinearLayout>
</LinearLayout>

View File

@ -4,4 +4,6 @@
<attr name="feedlistBackground" format="reference|color" />
<attr name="unreadCounterColor" format="reference|color" />
<attr name="headlinesBackground" format="reference|color" />
<attr name="articleHeader" format="reference|color" />
<attr name="articleDivider" format="reference|color" />
</resources>

View File

@ -4,6 +4,8 @@
<item name="feedlistBackground">#fafafa</item>
<item name="unreadCounterColor">#0000ff</item>
<item name="headlinesBackground">#ffffff</item>
<item name="articleDivider">#f0f0f0</item>
<item name="articleHeader">#ffffff</item>
</style>
<style name="DarkTheme" parent="android:Theme.Holo">
@ -11,6 +13,8 @@
<item name="feedlistBackground">#101010</item>
<item name="unreadCounterColor">#0000ff</item>
<item name="headlinesBackground">#000000</item>
<item name="articleDivider">#303030</item>
<item name="articleHeader">#101010</item>
</style>
<style name="SelectedFeed">

View File

@ -62,7 +62,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener {
list.setOnItemClickListener(this);
if (m_feed != null) refresh();
return view;
}

View File

@ -88,13 +88,17 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
ArticleFragment af = new ArticleFragment();
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.setCustomAnimations(android.R.animator.fade_in, android.R.animator.fade_out);
ft.replace(R.id.feeds_fragment, new FeedsFragment());
ft.replace(R.id.headlines_fragment, hf);
ft.replace(R.id.article_fragment, af);
ft.hide(af);
ft.hide(hf);
//ft.hide(hf);
//ft.hide(af);
ft.commit();
findViewById(R.id.article_fragment).setVisibility(View.GONE);
findViewById(R.id.headlines_fragment).setVisibility(View.GONE);
LoginRequest ar = new LoginRequest();
ar.setApi(m_prefs.getString("ttrss_url", null));
@ -264,6 +268,8 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
ft.replace(R.id.headlines_fragment, hf);
ft.addToBackStack(null);
ft.commit();
findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE);
}
public Article getSelectedArticle() {
@ -276,6 +282,9 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
m_selectedArticle = article;
article.unread = false;
ArticleFragment frag = new ArticleFragment();
FragmentTransaction ft = getFragmentManager().beginTransaction();
@ -286,6 +295,7 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
ft.addToBackStack(null);
ft.commit();
findViewById(R.id.article_fragment).setVisibility(View.VISIBLE);
}
public Feed getActiveFeed() {