آیا دیزاین ساپورت با با اندروید زیر 5 مشکل داره ؟؟؟
آخه الان یه سورس تب هاست رو دروی اندروید 5 اجرا میکنم بدون مشکل اجرا میشه ولی روی اندزوید زیر 5 اررو اررور Unfortunately stopped میده با این وجود که توی مینفست مینیموم رو روی 7 هست روی چن تا گوشی و امولاتور هم امتحان کردم و نه فقط همین سورس بلکه هرسورسی که توش دیزاین سا\ورت بکار میبرم فقط توی اندروید 5 به بالا جواب میده
اینم سورس
#Region Project Attributes
#ApplicationLabel: Fixed Tabs with icons
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\resource
#AdditionalRes: H:\Program Files (x86)\Basic4android\Libraries\b4a_appcompat , de.amberhome.objects.appcompat
#AdditionalRes: H:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat\res , android.support.v7.appcompat
#Extends: android.support.v7.app.AppCompatActivity
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private VP As AHViewPager
Private PC As AHPageContainer
Private TabLayout As DSTabLayout
Private ToolBar As ACToolBarLight
Private Label As Label
Private Icon As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("layout1")
'Initialize the Toolbar and set a title
ToolBar.SetAsActionBar
ToolBar.Title = "Tabs with icon example"
'Initialize a PageContainer Object with 10 pages. Each page contains a panel with different color
PC.Initialize
For i = 0 To 2
Dim p As Panel
p.Initialize("")
p.Color = Colors.RGB(Rnd(0,256), Rnd(0,256), Rnd(0,256))
'Don't add a title here
PC.AddPage(p, "")
Next
'Set the PageContainer for the ViewPager
VP.PageContainer = PC
'Set the Elevation for the Toolbar
Dim ac As AppCompat
ac.SetElevation(ToolBar, 4dip)
ac.SetElevation(TabLayout, 4dip)
'Set the tabmode to fixed and gravity to fill
TabLayout.TabGravity = TabLayout.GRAVITY_FILL
TabLayout.TabMode = TabLayout.MODE_FIXED
'Set colors. The indicator color defaults to "colorAccent"
TabLayout.Color = ac.GetThemeAttribute("colorPrimary")
TabLayout.TabIndicatorColor = Colors.White
'Connect the TabLayout with the Viewpager.
'This will create the tabs and will keep tabs and pages
'in sync and creates a nice indicator animation.
TabLayout.SetViewPager(VP)
'Set the Icons for the tabs
Dim xml As XmlLayoutBuilder
TabLayout.SetTabIcon(0, xml.GetDrawable("ic_alarm_white_24dp"))
TabLayout.SetTabIcon(1, xml.GetDrawable("ic_favorite_white_24dp"))
TabLayout.SetTabIcon(2, xml.GetDrawable("ic_settings_white_24dp"))
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
سوال
sbr 233
سلام دوستان
آیا دیزاین ساپورت با با اندروید زیر 5 مشکل داره ؟؟؟
آخه الان یه سورس تب هاست رو دروی اندروید 5 اجرا میکنم بدون مشکل اجرا میشه ولی روی اندزوید زیر 5 اررو اررور Unfortunately stopped میده با این وجود که توی مینفست مینیموم رو روی 7 هست روی چن تا گوشی و امولاتور هم امتحان کردم و نه فقط همین سورس بلکه هرسورسی که توش دیزاین سا\ورت بکار میبرم فقط توی اندروید 5 به بالا جواب میده
اینم سورس
#Region Project Attributes #ApplicationLabel: Fixed Tabs with icons #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End Region #AdditionalRes: ..\resource #AdditionalRes: H:\Program Files (x86)\Basic4android\Libraries\b4a_appcompat , de.amberhome.objects.appcompat #AdditionalRes: H:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat\res , android.support.v7.appcompat #Extends: android.support.v7.app.AppCompatActivity #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private VP As AHViewPager Private PC As AHPageContainer Private TabLayout As DSTabLayout Private ToolBar As ACToolBarLight Private Label As Label Private Icon As ImageView End Sub Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: Activity.LoadLayout("layout1") 'Initialize the Toolbar and set a title ToolBar.SetAsActionBar ToolBar.Title = "Tabs with icon example" 'Initialize a PageContainer Object with 10 pages. Each page contains a panel with different color PC.Initialize For i = 0 To 2 Dim p As Panel p.Initialize("") p.Color = Colors.RGB(Rnd(0,256), Rnd(0,256), Rnd(0,256)) 'Don't add a title here PC.AddPage(p, "") Next 'Set the PageContainer for the ViewPager VP.PageContainer = PC 'Set the Elevation for the Toolbar Dim ac As AppCompat ac.SetElevation(ToolBar, 4dip) ac.SetElevation(TabLayout, 4dip) 'Set the tabmode to fixed and gravity to fill TabLayout.TabGravity = TabLayout.GRAVITY_FILL TabLayout.TabMode = TabLayout.MODE_FIXED 'Set colors. The indicator color defaults to "colorAccent" TabLayout.Color = ac.GetThemeAttribute("colorPrimary") TabLayout.TabIndicatorColor = Colors.White 'Connect the TabLayout with the Viewpager. 'This will create the tabs and will keep tabs and pages 'in sync and creates a nice indicator animation. TabLayout.SetViewPager(VP) 'Set the Icons for the tabs Dim xml As XmlLayoutBuilder TabLayout.SetTabIcon(0, xml.GetDrawable("ic_alarm_white_24dp")) TabLayout.SetTabIcon(1, xml.GetDrawable("ic_favorite_white_24dp")) TabLayout.SetTabIcon(2, xml.GetDrawable("ic_settings_white_24dp")) End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub
لینک ارسال
به اشتراک گذاری در سایت های دیگر
5 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.