appbar

AppBar button icon not fitting inside elipse

自作多情 提交于 2019-12-02 01:03:26
Hey I am creating bottom app bar and adding 3, app bar button to it like shown below. One use inbuilt icon and the other two uses Bitmap icons <AppBarButton> <AppBarButton.Icon> <BitmapIcon UriSource="ms-appx:///Assets/Like.png" Height="20" Width="20"/> </AppBarButton.Icon> AppBarButton with bitmap icons display correctly in the design view, that is enclosed within the eclipse of appbar button. But when I deploy it on my phone the app bar button looks like below (two on the right) https://s24.postimg.org/q3yg74gx1/wp_ss_20150309_0002.jpg What is wron with it I think you may have forgotten

Padding / space in Toolbar between icon and title (Android 24)

纵然是瞬间 提交于 2019-12-01 18:06:17
With the new Android 24, I found out that the icon and title on the Toolbar has a wider padding and I can't find any way to resolve this. Example: MainActivity.java: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setTitle("Testing"); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true);

Padding / space in Toolbar between icon and title (Android 24)

坚强是说给别人听的谎言 提交于 2019-12-01 17:03:55
问题 With the new Android 24, I found out that the icon and title on the Toolbar has a wider padding and I can't find any way to resolve this. Example: MainActivity.java: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setTitle("Testing");

Windows Phone 8.1 AppBarButton icon with 2 rows of text

左心房为你撑大大i 提交于 2019-12-01 07:19:54
问题 I would like to know how to make AppBarButton Icon to has 2 rows of text. I want to make it like in Windows Calendar: 回答1: The AppBarButton doesn't display text or arbitrary Xaml in its Icon. It needs to be a symbol from a font, bitmap, or path. For a calendar display like that you'll be best off with a bitmap. Since you probably don't want to pregenerate 366 icons you can use RenderTargetBitmap to create them on the fly. Assuming "ButtonImageMaster" is a Xaml snippet with the day and month

Global App bar on windows 8 application

烈酒焚心 提交于 2019-12-01 01:00:37
问题 I'm working on a Windows 8 application project. I'm using Visual Studio 2012 and it's predefined Templates (GroupedPage, SplitPage, ItemsPage). At this time I need to add an App bar. the way I choose is to create one and display it on all of the pages. I'm readind this article : http://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj150604.aspx To include this on my project, I set the Global page as start page on the App.xaml protected async override void OnLaunched

How to make Recycler View not scroll when appbar snaps

故事扮演 提交于 2019-11-30 08:25:20
问题 I have made the snapping app bar like this: Please note that when the scroll is left in the middle(i.e the title is half visible, then the app bar snaps automatically) In case of google play this is what the snap looks like: Now, I want the snap to work like the one in google play. Which is that when the snap occurs, then only the app bar should snap and the recycler view should not move. It would be better if the solution supported pre lollipop devices too. Thanks! 回答1: I found a solution

Android Material风格的应用(一)--AppBar TabLayout

大兔子大兔子 提交于 2019-11-29 22:43:48
打造Material风格的Android应用 Android Material风格的应用(一)--AppBar TabLayout Android Material风格的应用(二)--RecyclerView Android Material风格的应用(三)--DrawerLayout Android Material风格的应用(四)--FloatActionButton Android Material风格的应用(五)--CollapsingToolbar 开发环境: JDK 8+ Android Studio 2.2.2 工程源码 Themes And Colors 主题颜色值 res/values/colors.xml <resources> <color name="colorPrimary">#3F51B5</color> <color name="colorPrimaryDark">#303F9F</color> <color name="colorAccent">#FF4081</color> </resources> 如此,添加一个Light主题风格的style res/values/styles.xml <style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar"> <!--

How to make Recycler View not scroll when appbar snaps

混江龙づ霸主 提交于 2019-11-29 06:38:25
I have made the snapping app bar like this: Please note that when the scroll is left in the middle(i.e the title is half visible, then the app bar snaps automatically) In case of google play this is what the snap looks like: Now, I want the snap to work like the one in google play. Which is that when the snap occurs, then only the app bar should snap and the recycler view should not move. It would be better if the solution supported pre lollipop devices too. Thanks! I found a solution that works quite well in my project. It consists of 2 behaviors, one for the AppBarLayout and another one for

How to make the Toolbar snap into view or out of view when using Google Design Library?

不羁的心 提交于 2019-11-27 12:08:30
I am trying to achieve an effect like WhatsApp has, where the Toolbar (when scrolled) will clip into view magnetlike, or out of view magnetlike. What I have im my MainActivity XML: DrawerLayout - Base Layout CoordinatorLayout - Layout for the Appbar and Toolbar and Tabs AppBarLayout - For holding Toolbar and Tabs Toolbar - has THIS flag: app:layout_scrollFlags="scroll|enterAlways" SlidingTabLayout - Displays tabs ViewPager - For tabs RecyclerView - For coordinatorlayout Now dont get me wrong, it works, when I scroll down the toolbar gets pushed out of view but say I stop scrolling halfway,

How to make the Toolbar snap into view or out of view when using Google Design Library?

扶醉桌前 提交于 2019-11-26 15:54:56
问题 I am trying to achieve an effect like WhatsApp has, where the Toolbar (when scrolled) will clip into view magnetlike, or out of view magnetlike. What I have im my MainActivity XML: DrawerLayout - Base Layout CoordinatorLayout - Layout for the Appbar and Toolbar and Tabs AppBarLayout - For holding Toolbar and Tabs Toolbar - has THIS flag: app:layout_scrollFlags="scroll|enterAlways" SlidingTabLayout - Displays tabs ViewPager - For tabs RecyclerView - For coordinatorlayout Now dont get me wrong,