Updated drawer UI and font
BIN
res/drawable-hdpi/ic_action_plus.png
Normal file
After Width: | Height: | Size: 181 B |
BIN
res/drawable-hdpi/ic_action_star.png
Normal file
After Width: | Height: | Size: 884 B |
BIN
res/drawable-mdpi/ic_action_plus.png
Normal file
After Width: | Height: | Size: 134 B |
BIN
res/drawable-mdpi/ic_action_star.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
res/drawable-xhdpi/ic_action_plus.png
Normal file
After Width: | Height: | Size: 201 B |
BIN
res/drawable-xhdpi/ic_action_star.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
res/drawable-xxhdpi/ic_action_plus.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
res/drawable-xxhdpi/ic_action_star.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
@ -1,6 +1,4 @@
|
|||||||
<!--
|
<!-- Copyright 2014 ACR Development -->
|
||||||
Copyright 2014 ACR Development
|
|
||||||
-->
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/main_layout"
|
android:id="@+id/main_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -25,33 +23,17 @@
|
|||||||
android:progressDrawable="@drawable/progress" />
|
android:progressDrawable="@drawable/progress" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
|
|
||||||
|
|
||||||
<android.support.v4.widget.DrawerLayout
|
<android.support.v4.widget.DrawerLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/drawer_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent" >
|
||||||
|
|
||||||
<!--
|
|
||||||
As the main content view, the view below consumes the entire
|
|
||||||
space available using match_parent in both dimensions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/content_frame"
|
android:id="@+id/content_frame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
<!--
|
|
||||||
android:layout_gravity="start" tells DrawerLayout to treat
|
|
||||||
this as a sliding drawer on the left side for left-to-right
|
|
||||||
languages and on the right side for right-to-left languages.
|
|
||||||
The drawer is given a fixed width in dp and extends the full height of
|
|
||||||
the container. A solid background is used for contrast
|
|
||||||
with the content view.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/drawer"
|
android:id="@+id/drawer"
|
||||||
android:layout_width="@dimen/navigation_width"
|
android:layout_width="@dimen/navigation_width"
|
||||||
@ -61,20 +43,44 @@
|
|||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<TextView
|
<RelativeLayout
|
||||||
android:id="@+id/new_tab_button"
|
android:id="@+id/new_tab_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:background="@drawable/list_bg"
|
android:background="@drawable/list_bg"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
android:orientation="horizontal" >
|
||||||
android:paddingLeft="12dp"
|
|
||||||
android:textStyle="bold"
|
<ImageView
|
||||||
android:paddingRight="16dp"
|
android:id="@+id/plusIcon"
|
||||||
android:text="@string/action_new_tab"
|
android:layout_width="24dp"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:layout_height="24dp"
|
||||||
android:textColor="#000000" />
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="2dp"
|
||||||
|
android:contentDescription="Favicon"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="2dp"
|
||||||
|
android:paddingRight="2dp"
|
||||||
|
android:src="@drawable/ic_action_plus" >
|
||||||
|
</ImageView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@+id/plusIcon"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||||
|
android:text="@string/action_new_tab"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/view"
|
android:id="@+id/view"
|
||||||
@ -89,9 +95,9 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@+id/lineView"
|
android:layout_above="@+id/lineView"
|
||||||
android:layout_below="@+id/view"
|
android:layout_below="@+id/view"
|
||||||
android:listSelector="@drawable/list_bg"
|
|
||||||
android:choiceMode="singleChoice"
|
android:choiceMode="singleChoice"
|
||||||
android:dividerHeight="1dp" />
|
android:dividerHeight="1dp"
|
||||||
|
android:listSelector="@drawable/list_bg" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/lineView"
|
android:id="@+id/lineView"
|
||||||
@ -129,7 +135,6 @@
|
|||||||
android:src="@drawable/ic_action_back" />
|
android:src="@drawable/ic_action_back" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/action_forward"
|
android:id="@+id/action_forward"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -161,18 +166,44 @@
|
|||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<TextView
|
<RelativeLayout
|
||||||
android:id="@+id/textView1"
|
android:id="@+id/bookmark_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textStyle="bold"
|
android:layout_alignParentTop="true"
|
||||||
|
android:background="@drawable/list_bg"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
android:orientation="horizontal" >
|
||||||
android:paddingLeft="12dp"
|
|
||||||
android:paddingRight="16dp"
|
<ImageView
|
||||||
android:text="@string/action_bookmarks"
|
android:id="@+id/starIcon"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:layout_width="24dp"
|
||||||
android:textColor="#000000" />
|
android:layout_height="24dp"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="2dp"
|
||||||
|
android:contentDescription="Favicon"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="2dp"
|
||||||
|
android:paddingRight="2dp"
|
||||||
|
android:src="@drawable/ic_action_star" >
|
||||||
|
</ImageView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@+id/starIcon"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||||
|
android:text="@string/action_bookmarks"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@ -183,9 +214,9 @@
|
|||||||
android:id="@+id/right_drawer_list"
|
android:id="@+id/right_drawer_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:listSelector="@drawable/list_bg"
|
|
||||||
android:divider="#bababa"
|
android:divider="#bababa"
|
||||||
android:dividerHeight="1dp" />
|
android:dividerHeight="1dp"
|
||||||
|
android:listSelector="@drawable/list_bg" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v4.widget.DrawerLayout>
|
</android.support.v4.widget.DrawerLayout>
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||||
android:paddingRight="4dp"
|
android:paddingRight="4dp"
|
||||||
|
@ -2,20 +2,20 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:background="@drawable/list_bg"
|
android:background="@drawable/list_bg"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal" >
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/favicon1"
|
android:id="@+id/favicon1"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:contentDescription="Favicon"
|
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginRight="2dp"
|
android:layout_marginRight="2dp"
|
||||||
|
android:contentDescription="Favicon"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:paddingLeft="2dp"
|
android:paddingLeft="2dp"
|
||||||
android:paddingRight="2dp" >
|
android:paddingRight="2dp" >
|
||||||
</ImageView>
|
</ImageView>
|
||||||
@ -24,11 +24,12 @@
|
|||||||
android:id="@+id/text1"
|
android:id="@+id/text1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:maxLines="1"
|
|
||||||
android:layout_toRightOf="@+id/favicon1"
|
|
||||||
android:layout_toLeftOf="@+id/delete1"
|
android:layout_toLeftOf="@+id/delete1"
|
||||||
|
android:layout_toRightOf="@+id/favicon1"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||||
android:textColor="@color/dark_text" />
|
android:textColor="@color/dark_text" />
|
||||||
@ -36,15 +37,15 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/delete1"
|
android:id="@+id/delete1"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
android:contentDescription="Delete Tab"
|
android:contentDescription="Delete Tab"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingLeft="2dp"
|
android:paddingLeft="2dp"
|
||||||
android:paddingRight="2dp"
|
android:paddingRight="2dp"
|
||||||
android:layout_marginLeft="6dp"
|
|
||||||
android:layout_marginRight="6dp"
|
|
||||||
android:src="@drawable/ic_action_delete" >
|
android:src="@drawable/ic_action_delete" >
|
||||||
</ImageView>
|
</ImageView>
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
<style name="normalText" >
|
<style name="normalText" >
|
||||||
<item name="android:textStyle">normal</item>
|
<item name="android:textStyle">normal</item>
|
||||||
|
<item name="android:fontFamily">sans-serif-light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -107,7 +107,7 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
private RelativeLayout mDrawer;
|
private RelativeLayout mDrawer;
|
||||||
private LinearLayout mDrawerRight;
|
private LinearLayout mDrawerRight;
|
||||||
private ListView mDrawerListRight;
|
private ListView mDrawerListRight;
|
||||||
private TextView mNewTab;
|
private RelativeLayout mNewTab;
|
||||||
private ActionBarDrawerToggle mDrawerToggle;
|
private ActionBarDrawerToggle mDrawerToggle;
|
||||||
private List<LightningView> mWebViews = new ArrayList<LightningView>();
|
private List<LightningView> mWebViews = new ArrayList<LightningView>();
|
||||||
private List<Integer> mIdList = new ArrayList<Integer>();
|
private List<Integer> mIdList = new ArrayList<Integer>();
|
||||||
@ -187,7 +187,7 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
mBrowserFrame = (FrameLayout) findViewById(R.id.content_frame);
|
mBrowserFrame = (FrameLayout) findViewById(R.id.content_frame);
|
||||||
mProgress = (ProgressBar) findViewById(R.id.activity_bar);
|
mProgress = (ProgressBar) findViewById(R.id.activity_bar);
|
||||||
mProgress.setVisibility(View.GONE);
|
mProgress.setVisibility(View.GONE);
|
||||||
mNewTab = (TextView) findViewById(R.id.new_tab_button);
|
mNewTab = (RelativeLayout) findViewById(R.id.new_tab_button);
|
||||||
mDrawer = (RelativeLayout) findViewById(R.id.drawer);
|
mDrawer = (RelativeLayout) findViewById(R.id.drawer);
|
||||||
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||||
mDrawerList = (ListView) findViewById(R.id.left_drawer);
|
mDrawerList = (ListView) findViewById(R.id.left_drawer);
|
||||||
@ -850,7 +850,15 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
if (mCurrentView != null) {
|
if (mCurrentView != null) {
|
||||||
mCurrentView.loadUrl(mBookmarkList.get(position).getUrl());
|
mCurrentView.loadUrl(mBookmarkList.get(position).getUrl());
|
||||||
}
|
}
|
||||||
mDrawerLayout.closeDrawer(mDrawerRight);
|
// keep any jank from happening when the drawer is closed after the
|
||||||
|
// URL starts to load
|
||||||
|
final Handler handler = new Handler();
|
||||||
|
handler.postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mDrawerLayout.closeDrawer(mDrawerRight);
|
||||||
|
}
|
||||||
|
}, 150);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1051,9 +1059,9 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
mDrawerList.setItemChecked(position, true);
|
mDrawerList.setItemChecked(position, true);
|
||||||
showTab(mWebViews.get(position));
|
showTab(mWebViews.get(position));
|
||||||
|
|
||||||
//Use a delayed handler to make the transition smooth
|
// Use a delayed handler to make the transition smooth
|
||||||
//otherwise it will get caught up with the showTab code
|
// otherwise it will get caught up with the showTab code
|
||||||
//and cause a janky motion
|
// and cause a janky motion
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
handler.postDelayed(new Runnable() {
|
handler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|