I updated my Titanium sdk to 3.5.0GA, but there exits a default action bar on every window on Android.
Can anyone please tell me how to permanently disable this default action bar?
Thanks in advance.
Define the settings for your custom theme, for example, your theme at /platform/android/res/values/customtheme.xml like
< ?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.NoActionBar" parent="#style/Theme.AppCompat">
<item name="windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
Then, activate this theme on your tiapp.xml:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application android:theme="#style/Theme.NoActionBar"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/>
</manifest>
</android>
for more see : Link
Related
I'm tyring to use a badget with Materials but I have several custom styles and when I use it, my custom button's style dissapear
I know that it works If I replace in my manifest
android:theme="#style/Theme.AppCompat.NoActionBar"
with
android:theme="#style/Theme.MaterialComponents.DayNight.NoActionBar"
Here is my full manifest
<application
android:allowBackup="true"
android:dataExtractionRules="#xml/data_extraction_rules"
android:fullBackupContent="#xml/backup_rules"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.AppCompat.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:targetApi="31">
But I have a custom xml to modify my buttons which I attach using the backgroudn property of buttons and when I change the manifest I lose my effects
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient
android:type="radial"
android:centerX="50%"
android:centerY="50%"
android:startColor="#6859C1"
android:endColor="#34278C"
android:gradientRadius="100%"
/>
<stroke android:width="1dp"
android:color="#FFFFFF"/>
<padding android:left="1dp"
android:top="1dp"
android:right="1dp"
android:bottom="1dp"/>
<corners android:radius="30px"/>
</shape>
What am I doing wrongly?
Thanks in advance!
I configured the splash screen and two are showing.
How do I remove it first?
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#color/primary" />
<item
android:drawable="#mipmap/logo"
android:height="300dp"
android:width="300dp"
android:gravity="center"
/>
</layer-list>
This is my splash screen and before she appears another one with the ic_launcher_round.
I'm using my custom rating bar. The top image with 5 stars is on Lollipop where my ratingbar works fine. However, below Lollipop (Kitat, JellyBean, ICS) versions the rating bar is goofed up (check second image with a single star)
What can be the problem? I tried all possible methods, changing theme, managing height width...nothing seems to work :(
This is the style
<style name="customRatingBar" parent="#android:style/Widget.RatingBar">
<item name="android:progressDrawable">#drawable/rating_custom_bar</item>
</style>
This is the rating bar xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="#+android:id/background"
android:drawable="#drawable/star_blank"/>
<item
android:id="#+android:id/secondaryProgress"
android:drawable="#drawable/star_blank"/>
<item
android:id="#+android:id/progress"
android:drawable="#drawable/star_filled"/>
</layer-list>
This is star blank
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/rating_empty" android:state_pressed="true" android:state_window_focused="true"/>
<item android:drawable="#drawable/rating_empty" android:state_focused="true" android:state_window_focused="true"/>
<item android:drawable="#drawable/rating_empty" android:state_selected="true" android:state_window_focused="true"/>
<item android:drawable="#drawable/rating_empty"/>
</selector>
This is star filled
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/rating_full" android:state_pressed="true" android:state_window_focused="true"/>
<item android:drawable="#drawable/rating_full" android:state_focused="true" android:state_window_focused="true"/>
<item android:drawable="#drawable/rating_full" android:state_selected="true" android:state_window_focused="true"/>
<item android:drawable="#drawable/rating_full"/>
</selector>
I have the same problem and spend a lot of time in it, tried setting all parameters at the ratingBar but none work, but there was something weird. I was working with a friend in a project and he compiles the exact same code as I and doesn't have this issue, so I change the IDE to his and all starts working.
I was using "Android Developer Tools", the eclipse you used to download at https://developer.android.com/training/index.html which is an eclipse with the ADT already embedded.
I change to Java EE and download ADT following this instructions http://developer.android.com/sdk/installing/installing-adt.html
I hope this helps you with your problem.
Has been a while but never hurts to answer. Here is my 3 step solution regardless of SDK version.
1- Add this as your RatingBar in your xml layout:
<RatingBar
android:id="#+id/new_ratingbar"
android:progressDrawable="#drawable/custom_drawable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:stepSize="0.5"/>
If needed, you can give the RatingBar minHeight and maxHeight or add other attributes as required.
2- Here is the drawable you would refer the above progressDrawable to:
custom_drawable.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="#android:id/background"
android:drawable="#drawable/rating_bar_empty" /> <!--this is your .png file-->
<item
android:id="#android:id/secondaryProgress"
android:drawable="#drawable/rating_bar_fill" /> <!--this is your .png file-->
<item
android:id="#android:id/progress"
android:drawable="#drawable/rating_bar_fill" /> <!--this is your .png file-->
</layer-list>
3- The last thing is to provide the .png files in your various drawable folders.
In my app I want set set my default logo as wide logo.When user pin to start my app wide logo will be shown how to do that?
I tried to edit manifest file but every thing is fine there
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
<Identity Name="eaccc03b-ad21-4762-9c73-39835d6eb23b" Publisher="CN=Admin" Version="1.0.0.0" />
<Properties>
<DisplayName>App5</DisplayName>
<PublisherDisplayName>Admin</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.3.0</OSMinVersion>
<OSMaxVersionTested>6.3.0</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="App5.App">
<m2:VisualElements DisplayName="Kids" Square150x150Logo="Assets\Logo.png" Square30x30Logo="Assets\SmallLogo.png" Description="App5" ForegroundText="light" BackgroundColor="#464646">
<m2:DefaultTile Wide310x150Logo="Assets\WideLogo.png">
<m2:ShowNameOnTiles>
<m2:ShowOn Tile="wide310x150Logo" />
</m2:ShowNameOnTiles>
</m2:DefaultTile>
<m2:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#ffffff" />
<m2:InitialRotationPreference>
<m2:Rotation Preference="landscape" />
</m2:InitialRotationPreference>
</m2:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
Just add DefaultSize property:
<m2:DefaultTile Wide310x150Logo="Assets\WideLogo.png" DefaultSize="wide310x150Logo">
...
</m2:DefaultTile>
this will make the Wide Tile as Default tile. if you want the 150*150 logo as default,just change DefaultSize as DefaultSize="square150x150Logo"
I'm trying to contribute a menu item to the Configure menu item/group in Project Explorer.
The following snippet adds my menu item to the same level. Adding <menu label="Configure" /> between <menuContribution ...> and <command ...> creates a duplicate Configure menu item.
What am I doing wrong?
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:org.eclipse.jdt.ui.PackageExplorer">
<command commandId="com.example.convert" label="Convert to XXX Project..." />
</menuContribution>
</extension>
<extension point="org.eclipse.ui.commands">
<command id="com.example.convert" defaultHandler="com.example.ConvertAction" name="Convert to XXX Project" />
</extension>
</plugin>
Using org.eclipse.ui.menus is the more future-safe way so I prefer that whenever I have a choice.
Set the locationURI to popup:org.eclipse.ui.projectConfigure
If you need to find the locationURI of any menu press Alt+Shift+F2, then open the menu as usual and click where you want to insert.
You should be using org.eclipse.ui.popupMenus extension point and adding an objectContribution.
Here's a simplified snippet in the plugin.xml that we are using inside of AJDT to contribute to the configure menu. You should be able to use something like this for your project.
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.core.resources.IProject"
adaptable="true"
id="iprojectcontributions">
<menu
label="%org.eclipse.ajdt.ui.tools"
id="org.eclipse.ajdt.ui.project.tools">
<separator
name="group0">
</separator>
</menu>
<visibility>
<and>
<objectState name="nature" value="org.eclipse.jdt.core.javanature"/>
<not>
<objectState name="nature" value="org.eclipse.ajdt.ui.ajnature"/>
</not>
<objectState name="open" value="true"/>
</and>
</visibility>
<action
label="%convertToAJP"
class="org.eclipse.ajdt.internal.ui.actions.AddAJNatureAction"
menubarPath="org.eclipse.ui.projectConfigure/additions"
id="addajnatureaction">
</action>
</objectContribution>
</extension>