android


use the new version of ADT


I used to install ADT 18. in my new project, I have a menu with this code
private void iniSlider(){
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerList = (ListView) findViewById(R.id.list_slidermenu);
mDrawerList.setOnItemClickListener(this);
NavDrawers = new ArrayList<>();
NavDrawers.add(new NavDrawer(getString(R.string.title_section1),R.drawable.login,new Fragment()));
NavDrawers.add(new NavDrawer(getString(R.string.title_section2),R.drawable.register,new Fragment()));
NavDrawers.add(new NavDrawer(getString(R.string.law),R.drawable.law,new Fragment()));
View headerView = ((LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.drawer_header, null, false);
mDrawerList.addHeaderView(headerView);
adapter = new NavDrawerListAdapter(getApplicationContext(),NavDrawers);
mDrawerList.setAdapter(adapter);
mDrawerLayout.setDrawerListener(mDrawerToggle);
mDrawerList.setAdapter(adapter);
mDrawerLayout.closeDrawer(mDrawerList);
}
and because of this line NavDrawers = new ArrayList<>();
I have a error in eclipse : Type '<>' operator is not allowed for source level below 1.7
then I use the latest version of ADT,SDK,JRE
but I have this error, and I use android tools-> fix
it says : Type Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead
and repeat from the begin
ps: I use appcompat az a lib in my project
do u know what is the problem and what should i do
my win is 8 and 64x
Can't see your creation of NavDrawers, it's :
private ArrayList<NavDrawer> NavDrawers= new ArrayList<NavDrawer>();
change from raw ArrayList<> to ArrayList<NavDrawer>

Related Links

Is there a way of keeping data in the volatile memory while the device is on?
Android custom view and nested fragments
Permanent NavigationView loose focus after an item is selected
Save image as 2cm*3cm in server after uploading from the app
Is it possible to mute sound coming from the headphone and play the alarm on android on the external speaker?
Could not find Android SDK after reopening eclipse
Robolectric sensor event simulation
Creating new Fragment vs Refreshing existing one - what is better for performance?
org.apache.http.legacy.jar Proguard error
How to prevent applications from accessing library's Firebase instance
Confused about setTranslationX() when translating FloatingActionButton on ViewPager scroll
How to traversed /proc directory in android in APK
Android Retrofit1.9.0 How to use common class for multiple method to save response
Can't inflate CardView from shared resources
RXJava - running multiple observables after another (like concat, but with onCompleted for each observable)
find correct format file in android

Categories

HOME
sonarqube
hyperlink
deep-learning
cheerio
eslint
redux-form
alexa-skills-kit
character-encoding
components
gradient
owl-carousel
opendj
cublas
mapbox
data-visualization
owin
google-chrome-app
android-securityexception
datastage
angular-dart
stellar.js
selenium-ide
renjin
screen-readers
searchview
breadth-first-search
undertow
babel
libigl
joptionpane
pimcore
scriptella
spotipy
jbutton
keras-layer
reactjs.net
installscript
raft
apic
loading
sharp-snmp
oracle-service-bus
xmldocument
procfile
opencmis
xbmc
jquery-ui-draggable
geotiff
custom-font
cmp
universal-analytics
android-instrumentation
restore
smartfoxserver
seek
microstation
neon
macaulay2
installshield-2010
jclouds
http-status-code-401
kango-framework
gcloud-ruby
lz77
fink
httpruntime.cache
ess
zscript
actionfilterattribute
code-documentation
uncaught-typeerror
entry-point
cbind
angular-carousel
cuba
tinyxml
dct
gnumeric
draw2d-js
maven-scm
synapse
cuda-gdb
thttpd
jquery-address
android-holo-everywhere
winmain
creole
dataform
inline-formset
ie-compatibility-mode
message-passing
blender-2.49
burndowncharts
filesystemobject
cldc
xpsdocument
netbeans6.1

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App