add headline drawable background
This commit is contained in:
parent
97f177186b
commit
4a2673f328
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.fox.ttrss"
|
||||
android:versionCode="300"
|
||||
android:versionCode="301"
|
||||
android:versionName="1.87" >
|
||||
|
||||
<uses-sdk
|
||||
|
@ -216,17 +216,20 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
||||
list.setOnItemClickListener(this);
|
||||
registerForContextMenu(list);
|
||||
|
||||
View layout = inflater.inflate(R.layout.drawer_header, list, false);
|
||||
list.addHeaderView(layout, null, false);
|
||||
// TODO: better check
|
||||
if (m_activity.findViewById(R.id.headlines_drawer) != null) {
|
||||
View layout = inflater.inflate(R.layout.drawer_header, list, false);
|
||||
list.addHeaderView(layout, null, false);
|
||||
|
||||
TextView login = (TextView) view.findViewById(R.id.drawer_header_login);
|
||||
TextView server = (TextView) view.findViewById(R.id.drawer_header_server);
|
||||
TextView login = (TextView) view.findViewById(R.id.drawer_header_login);
|
||||
TextView server = (TextView) view.findViewById(R.id.drawer_header_server);
|
||||
|
||||
login.setText(m_prefs.getString("login", ""));
|
||||
try {
|
||||
server.setText(new URL(m_prefs.getString("ttrss_url", "")).getHost());
|
||||
} catch (MalformedURLException e) {
|
||||
server.setText("");
|
||||
login.setText(m_prefs.getString("login", ""));
|
||||
try {
|
||||
server.setText(new URL(m_prefs.getString("ttrss_url", "")).getHost());
|
||||
} catch (MalformedURLException e) {
|
||||
server.setText("");
|
||||
}
|
||||
}
|
||||
|
||||
View loadingBar = (View) view.findViewById(R.id.feeds_loading_bar);
|
||||
|
@ -64,6 +64,21 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
||||
|
||||
if (m_drawerLayout != null) {
|
||||
|
||||
View drawerList = findViewById(R.id.feeds_fragment);
|
||||
|
||||
|
||||
int minWidth = dpToPx(240);
|
||||
int maxWidth = dpToPx(320);
|
||||
|
||||
int width = (int)((float)getResources().getDisplayMetrics().widthPixels * 0.7f);
|
||||
|
||||
if (width < minWidth) width = minWidth;
|
||||
if (width > maxWidth) width = maxWidth;
|
||||
|
||||
DrawerLayout.LayoutParams params = (android.support.v4.widget.DrawerLayout.LayoutParams) drawerList.getLayoutParams();
|
||||
params.width = width;
|
||||
drawerList.setLayoutParams(params);
|
||||
|
||||
m_drawerToggle = new ActionBarDrawerToggle(this, m_drawerLayout, R.string.blank, R.string.blank) {
|
||||
@Override
|
||||
public void onDrawerOpened(View drawerView) {
|
||||
|
@ -297,17 +297,20 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
||||
|
||||
list.addHeaderView(layout, null, false);
|
||||
} else {
|
||||
View layout = inflater.inflate(R.layout.drawer_header, list, false);
|
||||
list.addHeaderView(layout, null, false);
|
||||
// TODO: better check
|
||||
if (m_activity.findViewById(R.id.headlines_drawer) != null) {
|
||||
View layout = inflater.inflate(R.layout.drawer_header, list, false);
|
||||
list.addHeaderView(layout, null, false);
|
||||
|
||||
TextView login = (TextView) view.findViewById(R.id.drawer_header_login);
|
||||
TextView server = (TextView) view.findViewById(R.id.drawer_header_server);
|
||||
TextView login = (TextView) view.findViewById(R.id.drawer_header_login);
|
||||
TextView server = (TextView) view.findViewById(R.id.drawer_header_server);
|
||||
|
||||
login.setText(m_prefs.getString("login", ""));
|
||||
try {
|
||||
server.setText(new URL(m_prefs.getString("ttrss_url", "")).getHost());
|
||||
} catch (MalformedURLException e) {
|
||||
server.setText("");
|
||||
login.setText(m_prefs.getString("login", ""));
|
||||
try {
|
||||
server.setText(new URL(m_prefs.getString("ttrss_url", "")).getHost());
|
||||
} catch (MalformedURLException e) {
|
||||
server.setText("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/drawer_header.png
Normal file
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/drawer_header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/drawer_header.png
Normal file
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/drawer_header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
454
org.fox.ttrss/src/main/res/drawable/s_drawer_header.svg
Normal file
454
org.fox.ttrss/src/main/res/drawable/s_drawer_header.svg
Normal file
@ -0,0 +1,454 @@
|
||||
<?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="300mm"
|
||||
height="100mm"
|
||||
viewBox="0 0 1062.9921 354.3307"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
inkscape:export-filename="C:\Users\Andrew\Documents\Projects\tt-rss-android\org.fox.ttrss\src\main\res\drawable-hdpi\drawer_header.png"
|
||||
inkscape:export-xdpi="42.330002"
|
||||
inkscape:export-ydpi="42.330002"
|
||||
sodipodi:docname="s_drawer_header.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter4194">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood4196" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite4198" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur4200" />
|
||||
<feOffset
|
||||
dx="-2"
|
||||
dy="-2"
|
||||
result="offset"
|
||||
id="feOffset4202" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite4204" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter4194-9">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood4196-5" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite4198-4" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur4200-1" />
|
||||
<feOffset
|
||||
dx="-2"
|
||||
dy="-2"
|
||||
result="offset"
|
||||
id="feOffset4202-4" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite4204-1" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter4194-9-2">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood4196-5-8" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite4198-4-7" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur4200-1-0" />
|
||||
<feOffset
|
||||
dx="-2"
|
||||
dy="-2"
|
||||
result="offset"
|
||||
id="feOffset4202-4-3" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite4204-1-5" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter4194-9-7">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood4196-5-1" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite4198-4-1" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur4200-1-3" />
|
||||
<feOffset
|
||||
dx="-2"
|
||||
dy="-2"
|
||||
result="offset"
|
||||
id="feOffset4202-4-8" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite4204-1-1" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter4366">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood4368" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite4370" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur4372" />
|
||||
<feOffset
|
||||
dx="-2"
|
||||
dy="-2"
|
||||
result="offset"
|
||||
id="feOffset4374" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite4376" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter4378">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood4380" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite4382" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur4384" />
|
||||
<feOffset
|
||||
dx="-2"
|
||||
dy="-2"
|
||||
result="offset"
|
||||
id="feOffset4386" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite4388" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter4390">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood4392" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite4394" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur4396" />
|
||||
<feOffset
|
||||
dx="-2"
|
||||
dy="-2"
|
||||
result="offset"
|
||||
id="feOffset4398" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite4400" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter5941">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood5943" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite5945" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="20"
|
||||
result="blur"
|
||||
id="feGaussianBlur5947" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="0"
|
||||
result="offset"
|
||||
id="feOffset5949" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite5951" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter5953">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood5955" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite5957" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur5959" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="0"
|
||||
result="offset"
|
||||
id="feOffset5961" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite5963" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter5965">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood5967" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite5969" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="10"
|
||||
result="blur"
|
||||
id="feGaussianBlur5971" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="0"
|
||||
result="offset"
|
||||
id="feOffset5973" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite5975" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="538.56028"
|
||||
inkscape:cy="120.57602"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1137"
|
||||
inkscape:window-x="1912"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
borderlayer="true"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-global="false"
|
||||
objecttolerance="20"
|
||||
inkscape:showpageshadow="false">
|
||||
<sodipodi:guide
|
||||
position="0,804.28571"
|
||||
orientation="1,0"
|
||||
id="guide5843" />
|
||||
<sodipodi:guide
|
||||
position="315.71429,-1.4285714"
|
||||
orientation="0,1"
|
||||
id="guide5845" />
|
||||
<sodipodi:guide
|
||||
position="331.42858,744.28571"
|
||||
orientation="0,1"
|
||||
id="guide5847" />
|
||||
<sodipodi:guide
|
||||
position="1051.4286,604.28571"
|
||||
orientation="1,0"
|
||||
id="guide5849" />
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid5851" />
|
||||
</sodipodi:namedview>
|
||||
<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"
|
||||
transform="translate(0,-698.0315)">
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;"
|
||||
id="rect5856"
|
||||
width="1082.8835"
|
||||
height="783.87836"
|
||||
x="-27.591013"
|
||||
y="514.40118" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ececec;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;"
|
||||
id="rect5856-0"
|
||||
width="1642.8835"
|
||||
height="1189.2515"
|
||||
x="-1157.4727"
|
||||
y="618.21747"
|
||||
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,-318.4011,127.32849)" />
|
||||
<rect
|
||||
style="opacity:1;fill:#cbcbcb;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5856-0-5"
|
||||
width="1642.8835"
|
||||
height="1189.2515"
|
||||
x="-1146.5029"
|
||||
y="869.90796"
|
||||
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)" />
|
||||
<rect
|
||||
y="-1214.7825"
|
||||
x="161.0686"
|
||||
height="1214.8418"
|
||||
width="1678.2351"
|
||||
id="rect5873"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;"
|
||||
transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,-151.92899,192.67151)" />
|
||||
<rect
|
||||
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,546.11019,-369.63594)"
|
||||
y="1038.4409"
|
||||
x="-890.79224"
|
||||
height="1189.2515"
|
||||
width="1642.8835"
|
||||
id="rect5993"
|
||||
style="opacity:1;fill:#f5f5f5;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f5f5f5;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;"
|
||||
id="rect6005"
|
||||
width="1642.8835"
|
||||
height="1189.2515"
|
||||
x="-890.79224"
|
||||
y="1038.4409"
|
||||
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,546.11019,-369.63594)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 13 KiB |
@ -3,10 +3,18 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="96dp"
|
||||
android:orientation="vertical"
|
||||
android:background="?articleHeader"
|
||||
android:weightSum="1">
|
||||
android:weightSum="1"
|
||||
android:clickable="false">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/imageView"
|
||||
android:src="@drawable/drawer_header"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="?articleHeader"
|
||||
android:tintMode="multiply" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/feeds_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="240dp"
|
||||
android:layout_gravity="start"
|
||||
android:background="?feedlistBackground"
|
||||
android:elevation="4dp"
|
||||
|
Loading…
Reference in New Issue
Block a user