<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/nav_graph"
app:startDestination="#id/fragment">
<include app:graph="#navigation/included_graph" />
<fragment
android:id="#+id/fragment"
android:name="com.example.myapplication.BlankFragment"
android:label="Fragment in Root Graph"
tools:layout="#layout/fragment_blank">
<action
android:id="#+id/action_fragment_to_second_graph"
app:destination="#id/second_graph" />
</fragment>
I want to include graph(destination) As shown above in compose-navigation NavHost.
Is there any way? thanks!
Related
I tried to add a BroadcastReciever to the Android part of my Xamarin app to help with notifications, but if I try to register it in the manifest, I get the build error in the title of this question. I don't want to use code attributes because then it won't work if the app isn't running according to Microsoft's documentation (I don't remember which page).
Here is my (unmerged) manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.partylist" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="Partylist.Android">
<reciever android:name=".AlarmReciever" android:enabled="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</reciever>
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECIEVE_BOOT_COMPLETED" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
</manifest>
Also, the line that the error says it's on is actually the line where I have the intent filter inside the BroadcastReciever, not the BroadcastReciever itself.
Watch out for spelling typos, It should be <receiver> from BroadcastReceiver.
Having a drawable,
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="-90"
android:startColor="#00000000"
android:centerColor="#00000000"
android:endColor="#eefff000"
android:type="linear" />
</shape>
when using as
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/title_bk"
/>
it got an error:
android.view.InflateException: Binary XML file line #45: Binary XML file line #45: Error inflating class <unknown>
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.view.View.inflate(View.java:19790)
but using "#66000000" instead of the drawable it is fine
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#66000000"
/>
Why?
I change the manifest file to use the following theme:
change from:
#style/AppTheme
to
#style/Theme.Material.Light
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="App1.App1" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:allowBackup="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:roundIcon="#mipmap/ic_launcher_round" android:supportsRtl="true" **android:theme="#style/Theme.Material.Light"></application>
</manifest>
But when building and deploying got the following error:
Sdkminversion is as follows it is above 21.
uses-sdk android:minSdkVersion="23"
i have managed to make it able to compile using Theme.Holo.Light
however,the theme is still black in color by clearing the content in the following folder:
C:\Users\your_name\AppData\Local\Xamarin
Theme.Holo.Light is supposed to be white in colour background ,right?
Any idea what is wrong?
You should define Theme.Material.Light in your /Resource/values/style.xml.
<style name="MyMaterialTheme" parent="Theme.Material.Light">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">#1286d9</item>
<item name="colorPrimaryDark">#1286d9</item>
</style>
& than use it like this #style/MyMaterialTheme. You should use color and other features according to your preference.
😊
all
I want to manage freeswitch gateway by lua,how to do it?
such as:
<configuration name="lua.conf" description="LUA Configuration">
<settings>
<param name="xml-handler-script" value="gen_dir_user_xml.lua" />
<param name="xml-handler-bindings" value="directory" />
</settings>
</configuration>
this is manage the users configuration.
thanks
why to add lua code? this question is required config file and any lua code,but it has lua code.. the user management lua code so:
local req_domain = params:getHeader("domain")
local req_key = params:getHeader("key")
local req_user = params:getHeader("user")
local req_password = params:getHeader("pass")
local dbh = freeswitch.Dbh("freeswitch","postgres","tttt");
freeswitch.consoleLog("NOTICE","start connect DB...\r\n");
assert(dbh:connected());
dbh:query("select password from users where id="..req_user,function(row)
freeswitch.consoleLog("NOTICE",string.format("%s\n",row.password))
req_password=string.format("%s",row.password)
end);
dbh:release();
freeswitch.consoleLog("NOTICE","info:"..req_domain.."--"..req_key.."--"..req_user.."--"..req_password.."\n");
--assert (req_domain and req_key and req_user,
--"This example script only supports generating directory xml for a single user !\n")
if req_domain ~= nil and req_key~=nil and req_user~=nil then
XML_STRING =
[[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
<domain name="]]..req_domain..[[">
<params>
<param name="dial-string"
value="{presence_id=${dialed_user}#${dialed_domain}}${sofia_contact(${dialed_user}#${dialed_domain})}"/>
</params>
<groups>
<group name="default">
<users>
<user id="]] ..req_user..[[">
<params>
<param name="password" value="]]..req_password..[["/>
<param name="vm-password" value="]]..req_password..[["/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="]] ..req_user..[["/>
<variable name="user_context" value="default"/>
<variable name="directory-visible" value="true"/>
<variable name="directory-exten-visible" value="true"/>
<variable name="limit_max" value="15"/>
<variable name="effective_caller_id_name" value="Extension ]] ..req_user..[["/>
<variable name="effective_caller_id_number" value="]] ..req_user..[["/>
<variable name="outbound_caller_id_name" value="${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user>
</users>
</group>
</groups>
</domain>
</section>
</document>]]
else
XML_STRING =
[[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
</section>
</document>]]
end
Look at fusionpbx source code, it has lots of Lua code.
I'm trying to bind a web image in a listview on Android, using Xamarin.Android and mvvmcross. I'm getting this error though.
MvxBind:Error: 7.13 View type not found - Mvx.MvxHttpImageView
Android.Views.InflateException: Binary XML file line #1: Error inflating class Mvx.MvxHttpImageView
This is my axml...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res/com.mynamespace.android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Mvx.MvxHttpImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/iconeView"
local:MvxBind="{'HttpImageUrl':{'Path':'imageUrl'}}" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="30dp"
local:MvxBind="Text name" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="10dp"
local:MvxBind="Text tagline" />
</LinearLayout>
If you are using v3, then try
MvxImageView instead of MvxHttpImageView
ImageUrl instead of HttpImageUrl
The bound views are in https://github.com/slodge/MvvmCross/tree/v3/Cirrious/Cirrious.MvvmCross.Binding.Droid/Views
I think MvxImageView is also discussed in: http://slodge.blogspot.co.uk/2013/04/n2-lists-and-kittens-n1-days-of.html
You also need to include the MvvmCross File and DownloadCache Plugins, or else you'll get this error
"No IMvxImageHelper registered - you must provide an image helper before you can use a MvxImageView"